Rexx code to change word in jcl and submit.
There is a JCL code. Requirement is to run the job after doing "C ALL JOB1 JOB2".
Rexx code to change word in jcl and submit.
There is a JCL code. Requirement is to run the job after doing "C ALL JOB1 JOB2".
There are several ways of doing it. I would suggest ISPF skeltons
The rexx is
ADDRESS TSO "ALLOC DD(OUTSKEL) DS('"OUTSKPDS"') SHR"
job="job2" /* job1 */
'FTOPEN'
'FTINCL SAMPSKEL'
'FTCLOSE LIBRARY(OUTSKEL) NAME('WORKMEM')'
The Skeleton becomes
//&job. job
see Executing a DFSORT using REXX
You could use an edit macro. The rexx
'address ispexec edit dataset(my.job.to.edit) macro(mymacro)'
and the macro is roughly
address isredit 'macro'
address isredit 'c job1 job2 all'
address isredit 'sub'
Jou could read the JCL line by line, change each line as required and write a new JCL dataset file