I'm not sure exactly what you are passing in as
input, or expect to receive as output, so these
comments may be off target.
That said, if you want to get the subsystem in
which jobs are running, your code should be returning
this information. I tried (roughly) what you have,
printed the entire list without filtering, and
received (to print two):

Job name Status Subsystem
QCTL *ACTIVE /QSYS.LIB/QCTL.SBSD
QZDASOINIT *OUTQ

I would guess that the field str is not correctly
set to the path name of the subsystem.
If you want a list of jobs that are running in a
known subsystem, you could also try the Subsystem
class.

Thanks,
Don



--- Ashish Kulkarni <kulkarni_ash1312@xxxxxxxxx>
wrote:

Hi
What i have done so far is
JobList jobList = new JobList(as400);
while(e.hasMoreElements())
{
Job j = e.nextElement();
String str = j.getSubsystem();
if(str.trim().equalsIgnoreCase(subsystem.trim()))
{
System.out.println(j.getName());
}
}

I tried to add

jobList.addJobSelectionCriteria(JobList.SELECTION_PRIMARY_JOB_STATUS_ACTIVE,
Boolean.TRUE);


jobList.addJobSelectionCriteria(JobList.SELECTION_PRIMARY_JOB_STATUS_JOBQ,
Boolean.FALSE);


jobList.addJobSelectionCriteria(JobList.SELECTION_PRIMARY_JOB_STATUS_OUTQ,
Boolean.FALSE);

but id does not return any job
Any ideas how to filter the jobs


--- Ashish Kulkarni <kulkarni_ash1312@xxxxxxxxx>
wrote:

Hi
Is it possible to get all the active jobs under
QUSRWRK subsystem in Java program using JT400?

For example the AS400 command would be
WRKACTJOB SBS(QUSRWRK)
I would like an Array of all these jobs, so i can
go
through them one by one and check the status of
these
jobs.

Ashish






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.