×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




This may or may not be useful depending on your circumstances... But have
you checked out the QIBM_QWT_JOBNOTIFY exit point?


-----Original Message-----
From: Ashish Kulkarni [mailto:kulkarni_ash1312@xxxxxxxxx] 
Sent: Monday, October 13, 2003 12:05 PM
To: java400-l@xxxxxxxxxxxx
Subject: Running job in batch from java


Hi

I have a job which is submitted on AS400 in batch from
java,
So I have to write a java class which will submit this
job and then wait till the job is over on AS400, 
This is my code which keeps in loop checking for
status
// code to call a CL job and get the submitted job
number here
Job myJob = new Job(as400, jobNumber, jobUser,
newJobNum);
String jobStatus = myJob.getStatus();
System.out.println("Job status before " + jobStatus);
while (!jobStatus.equals("*ACTIVE"))
{
myJob = new Job(as400, jobNumber, jobUser, newJobNum); jobStatus =
myJob.getStatus(); }

this job runs for about 5 min, and I think that if I
keep on running this loop for 5 min it will consume a
lot of server resources,

so I want to write a program which will sleep for 1
min before checking the job status.

Can  anyone provide me some clue or code on how to do
it
Ashish


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com _______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
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-Ups:

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

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