Ask the Expert

A controlling program for canceling a submitted job

I want to create a (controlling) program which submits another job and cancels the submitted job occasionally. I believe that to cancel the job successfully the controlling program has to know the submitted job's job number. Is there any way to get job number of the submitted job when the controlling program submits the job?

When the job is submitted, it will generate a message CPC1221 stating that "Job 000000/USER/JOBNAME was submitted to..." You can retrieve that message from the program message queue using a RCVMSG and strip out the job number. There are some examples in the CL users guide found at the AS/400 books library.

This was first published in April 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: