Obtaining one or more Jobs

To retrieve a list of jobs matching a job name filter and/or an owner filter:

IJESCommandProvider commandProvider = ...
String jobNameFilter = ...
String ownerFilter = ...

// jobs will be empty if no jobs match the filters
List<IJob> jobs = commandProvider.findJobs(jobNameFilter, ownerFilter);

To retrieve a list of jobs matching a job name filter and/or an owner filter with a JES limit:

IJESCommandProvider commandProvider = ...
String jobNameFilter = ...
String ownerFilter = ...
int jesLimit = ...

// jobs will be empty if no jobs match the filters
// the number of returned jobs will be limited by jesLimit
List<IJob> jobs = commandProvider.findJobs(jobNameFilter, ownerFilter,
        jesLimit);

To retrieve a list of jobs matching a job name filter and/or an owner filter on a specific JES queue:

IJESCommandProvider commandProvider = ...
String jobNameFilter = ...
String ownerFilter = ...
int jesLimit = ...
boolean includePrintQueue = ...
boolean includeExecutionQueue = ...

// jobs will be empty if no jobs match the filters and JES queue
// the number of returned jobs will be limited by jesLimit
List<IJob> jobs = commandProvider.findJobs(jobNameFilter, ownerFilter,
        jesLimit, includePrintQueue, includeExecutionQueue);

To retrieve the list of sysout data definitions of a job from an IJESCommandProvider:

IJESCommandProvider commandProvider = ...
IJobInfo jobInfo = ...

List<ISysoutDataDefinition> dataDefinitions = commandProvider
        .fetchSysoutDataDefinitions(jobInfo);

To retrieve the list of sysout data definitions of a job from an IJob:

IJob job = ...

List<ISysoutDataDefinition> dataDefinitions = job
        .fetchSysoutDataDefinitions();
Was this page helpful? Yes No Submitting... Thank you

Comments