Posted: Wed Jan 21, 2004 1:36 am Post subject: Automation
I am new to mvsforum and hence not sure if this was discussed before. I did a search but could not find anything.
We sometimes get this requirement to run a cycle of jobs one after another. I am trying to automate this process using a JCL to submit the jobs one after another depending on the return code of the previous job, but I am facing a slight problem because each of the jobs have some input data (eg data in sysin etc) which has to be changed each time.
Of course one option is to first change all the jobs with required input data and then fire the JCL which initiates the cycle. But I want to know if this can be done passing a data card which will have all the new data in order of the jobs in the cycle and the JCL will replace all the old data with the new data provided.
I have this piece of code which does it
[code]
//REPLACE EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=AAAA.BBBB.JCL,DISP=SHR
//SYSIN DD *
$DD01 UPDATE EDITALL=(1,0,C'XXXXXX',C'YYYYYY')
[/code]
I can modify the JCL above to have the specific job in DD01 instead of the PDS and repeat it for all the jobs in the PDS since the data to be replaced is different for different jobs. I would like to know if there is any other better way we can do this?
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
Posted: Wed Jan 21, 2004 1:53 am Post subject:
Most shops have some type of tool that already can do what you want. Most have a job scheduler, like Jobtrac, CA7, ...... If you look in the rexx forum you should also find examples where others are trying to do this with rexx routines. You could also make one job out of all the steps and have the next step check if the return codes are ok before going on (cond=). Then you could have a rexx routine that modifies the data cards as needed and then submit the job.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum