Q

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

Dig deeper on RPG iSeries programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

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:

SearchEnterpriseLinux

SearchDataCenter

Close