Tim

Use RCVMSG after the SBMJOB is run.

RCVMSG MSGTYPE(*LAST) RMV(*YES) MSGDTA(&MSGDTA) MSGID(&MSGID)

should do it. Check that the &MSGID is CPC1221, which is the completion message that is sent. The job number is located at position 21 of the &MSGDTA variable.

How's that for magic? You also get job name at position 1, job user at position 11, job queue to which submitted at position 27, and job queue library at position 37. What I did to find this again (I never remember) was to SBMJOB CMD(WRKSYSSTS) and see what message was returned. Then DSPMSGD told me what the message data was and how it's laid out.

HTH
Vern

At 03:03 PM 4/2/2004 -0800, you wrote:
I doubt this is possible, but I have seen you guys come up with some great
ideas in the past...


I have a CL, that submits a job, is there any way, to retrieve the job number of the submitted job?

With out modify the submitted job to pass back the job number via
parameters, or data area or file...  I would like to avoid customizing the
called job...

Thanks, Tim



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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