|
And I don't know what you mean when you say a job ID changes when it is running - that will never happen - so get that message and you should be good to go - no need to use the internal.
HTH Vern At 07:25 AM 11/17/2006, you wrote:
Hi! I try to use the QUSRJOBI API to know when a submmited job ends. I did a RPGLE program that interfaces the API as an external program. Then I call my RPG program like that: 1) I do my SBMJOB 2) I do a RCVMSG MSGTYPE(*ANY) MSGDTA(&MSGDTA) MSGID(&MSGID) to know the full qualified name of the job I want to verify. 3) I call my RPG program with the jobname, the job user and the job id I retrieved previously from &MSGDTA The first time I call my RPG program, everything works fine as the job is in the JOBQ. But when the job begins (Status Code = *Running), it seems that the OS gives a new Job ID to my submited job. My RPG program no longer see my first job, so it returns the status code "Job Not Found". I tried to reference the submited job with its internal job id. The first time I call my RPG program, I call it with the full qualified job name and a blank internal job id. The subsequent calls to my RPG uses the filled internal job id, jobname = "*INT" and the rest of the full qualified name equals to blanks... I believed that this internal id was unique and invariant, even if the job id changes when the job is running... I wonder what am I doing wrong... Any suggestion? Charles -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.