|
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
As an Amazon Associate we earn from qualifying purchases.
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.