[gold-users] listing jobs charged to a specific allocation
Kevin Van Workum
vanw at sabalcore.com
Mon Mar 8 14:31:06 MST 2010
On Mon, Mar 8, 2010 at 3:33 PM, Kevin Van Workum <vanw at sabalcore.com> wrote:
> I'm trying to create a command that will list jobs that have been
> charged to a specific allocation. I realize I can use "glstxn -i Id -O
> Job", but that lists the transactions. I want to get the list of jobs.
> I could first use glstxn, then use glsjob for each job found, but is
> there a more efficient way. Maybe something like:
>
> my $request = new Gold::Request(object => "Job", action => "Query");
> Gold::Client::buildSupplements($request);
> $request->setCondition("AllocationId", "123");
>
Also, assuming I've done this:
my $request = new Gold::Request(object => "Transaction", action
=> "Query");
Gold::Client::buildSupplements($request);
$request->setCondition("Allocation", $allocation);
$request->setCondition("Object", "Job");
$request->setSelection("JobId");
my $response = $request->getResponse();
How do I create an array, @jobids, that contains all the JobId values
in the response?
More information about the gold-users
mailing list