Page 1 of 1

Submit a JCL and give it's MAX-RC.

PostPosted: Sun Dec 16, 2012 10:35 pm
by Mehdi shri
Dear friends
How I can submit a JCL by a REXX command? If my PDS for JCL be "USR07.JCL.CNTL" and I want to submit member "ACCTJBAL" how I can do it. Please help me.
Special thanks.

Re: Submit a JCL and give it's MAX-RC.

PostPosted: Mon Dec 17, 2012 2:22 am
by Mehdi shri
In fact I want to write a procedure by REXX to execute two JCL frequently until an special MAX-RC represented. First JCL initiate a value(or a data set) and second JCL uses this value for processing.
My goal is testing the program which used in second JCL whit diffrent values (produced by first JCL).
Special thanks.

Re: Submit a JCL and give it's MAX-RC.

PostPosted: Mon Dec 17, 2012 2:58 am
by prino
Use your site's flucking scheduler.

Discussing home-built schedulers on these fora is totally forbidden, moderators please lock (or better delete) this thread.

Re: Submit a JCL and give it's MAX-RC.

PostPosted: Mon Dec 17, 2012 4:02 am
by steve-myers
I have to agree with Prino. If I read the first two posts correctly, the TS want to submit a job, wait for the job to complete, and then - somehow - retrieve the max RC for the job.

Mehdi shri: the system does not work that way. When you submit a job it becomes totally independent of the TSO user that submitted the job. The TSO user that submits the job has no control over when, or where, the job executes, and there is no defined way for the job to communicate with the TSO user that submitted the job. The job completion message the TSO user may receive is sent in a way that does not permit the TSO user from intercepting the message.

If you really want return code information, you can use TSO ALLOCATE commands to simulate the DD statements, and the CALL command to run the batch program in your TSO environment. A Rexx EXEC can use the RC variable to retrieve the return code from the CALL command, which is the return code of the batch program started by the CALL command. All this assumes the batch program can run in your TSO environment - most batch programs can - and on the system where your TSO session is running. Now whether your installation management will permit such foolishness is another issue which I will not address here.

Re: Submit a JCL and give it's MAX-RC.

PostPosted: Wed Jan 02, 2013 10:24 pm
by Pedro
Add another step to the first job, which will submit the second job.

Re: Submit a JCL and give it's MAX-RC.

PostPosted: Wed Jan 02, 2013 10:26 pm
by Pedro
My goal is testing the program which used in second JCL whit diffrent values (produced by first JCL).


Or perhaps you do not need the first job... have your rexx generate the different values automatically and then submit the second JCL to test the possible situations of the second job.