|
That is kind of what this procedure is doing. It uses QMHLJOBL api to get the qualified job name of submitted jobs and put it in array. It then uses the QUSRJOBI to determine the job status. The goal is to create a generic procedure that will work for any program that need this. Assuming the job ended abnormally might not be a good thing in this case. There are two different way to exec it: 1) trdWaitForAllThreadToComp - This one wait for all submitted job to complete. 2) trdClearThreadList - do this once. trdAddSbmJobToThreadList - call as job submitted (if want to wait for it to complete) trdWaitForThreadToComp - call to wait for above jobs. If spawn, as Scott suggested, is easy to use, then there is no need for above. Scott, remember, calling api is a scarely thing to do for most of programmers (I think any way). -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Fisher, Don Sent: Wednesday, December 07, 2005 2:05 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: Detemine job completion status In the case above, I just built a work file that's updated with the name of each submitted job and then used the TAATool command for job status to determine if the jobs were complete. If the record for the job was still in the work file and the job was not active or on the job queue, I assume the job ended abnormally. Perhaps something similar would work in this case?
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.