× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



thanx. that allready helps a lot.

-----Original Message-----
From: Tim Kosacek [mailto:tkosacek@visioninfo.com] 
Sent: Friday, February 14, 2003 2:09 PM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: check if as400 job is active


I can give you an example of how you could do this with the toolbox, but
it depends on how much you know about the job you are looking for.  Do
you have complete job information, the job name, user, and job number?
Or do you just know the job Name?

If you know the name, user, and number you can use the
com.ibm.as400.access.Job class.  Something like:

AS400 system = new AS400("mysystem", "myuser", "mypassword"); Job myJob
= new Job(system, jobName, userName, jobNumber); String status =
job.getStatus();  // From memory, I believe this would return *ACTIVE 
String subsystem = job.getSubsystem();

If you only know this job's name, you might consider constructing an
RJobList object, retrieving A list of all jobs by that name, and
iterating through the list until you find the job you are looking For.
Something like:

AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); RJobList
jobList = new RJobList(system);
jobList.setSelectionValue(RJobList.PRIMARY_JOB_STATUSES, new String[] {
RJob.JOB_STATUS_ACTIVE }); jobList.setSelectionValue(RJobList.JOB_NAME,
"MYJOBNAME");
jobList.open();
jobList.waitForComplete();

long numberOfJobs = jobList.getListLength();
for(long i = 0; i < numberOfJobs; ++i)
{
  RJob job = (RJob)jobList.resourceAt(i);
  // process your job, i.e. check subsystem.
}

jobList.close();

I'm not sure off hand if you can set Subsystem as a selection criteria.
You may have to hand filter those by retrieving the subsystem from the
Rjob object.

Hope this helps, if I'm way off from what you are looking for just let
me know.

Tim

-----Original Message-----
From: java400-l-bounces@midrange.com
[mailto:java400-l-bounces@midrange.com] On Behalf Of Mihael Knezevic
Sent: Friday, February 14, 2003 5:16 AM
To: java400-l@midrange.com
Subject: check if as400 job is active


hi,

does anybody know how to check if a specific as400 job is active in one
specific subsystem? any help is appreciated. a link to a specific os400
api would also be ok.

thanx in advance.

mk

_______________________________________________
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

_______________________________________________
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2024 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.