|
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
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.