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



IBM's Command List programming language & Restructured Extended Executor

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

Postby Mehdi shri » Sun Dec 16, 2012 10:35 pm

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.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

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

Postby Mehdi shri » Mon Dec 17, 2012 2:22 am

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.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

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

Postby prino » Mon Dec 17, 2012 2:58 am

Use your site's flucking scheduler.

Discussing home-built schedulers on these fora is totally forbidden, moderators please lock (or better delete) this thread.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 640
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

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

Postby steve-myers » Mon Dec 17, 2012 4:02 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

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

Postby Pedro » Wed Jan 02, 2013 10:24 pm

Add another step to the first job, which will submit the second job.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

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

Postby Pedro » Wed Jan 02, 2013 10:26 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post