Page 1 of 2
JCL Query- Urgent.
Posted: Wed Jan 21, 2009 2:39 pm
by pratik Ranjan
Hi All,
Actually I have a set of 12 jcls with me. All the jcls are using some common symbolic parameters, but the values of the paramters will change based on the execution date(still it has to be the same for all the jobs) . All the jobs have to run in sequence i.e. one after the other as they have dependencies on the previous one. So i have embedded the IKJEFT01 steps at the last of each jcl, which will invoke the next job.
Now actually before invoking the execution procedure of all the jobs, everytime i am supposed to change the values of the same parameters in all the jcls, and then start the execution. This is a repetitive task actually. So if someone could tell me please, is there any way so that i can copy all the symbolic parameter override statements somewhere and include it in all the jcls, so that supplying all the values at once will serve the purpose...maybe something like Copybook in COBOL.
Thanks in advance...
Pratik Ranjan.
Posted: Wed Jan 21, 2009 4:55 pm
by Natarajan
As per my knowledge, i dont think, jcl can read the symbolic parameters from outside.
Tell me - where you are using these symbolic parameters?
to send data to program?
Posted: Wed Jan 21, 2009 5:20 pm
by dbzTHEdinosauer
obviously you do not have a scheduler.
How is the IKJEF pgm, at the end of each job, submitting the next job?
Posted: Wed Jan 21, 2009 5:23 pm
by pratik Ranjan
Hi Natarajan,
Actually the symbolics are used in input and output DD statements of all the Jcls. All the I/O dataset names actually contains Execution date and other details which are common across all the Jobs. That's why i thought, if i could find anything like Copybook in JCL, then it would be easy for me to change the symbolics in only one place which will be in effect reflected across all the Jcls.
Thanks.
Posted: Wed Jan 21, 2009 5:41 pm
by pratik Ranjan
Actually i have simply added the step for submitting next job to the end of each job as shown below.
//EXECUTE EXEC PGM=IKJEFT01,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SUB 'IBMPTDV.TWE.JCL(WH02STKH)'
/*
This submits the next job 'WH02STKH' automatically.
Posted: Wed Jan 21, 2009 5:49 pm
by Natarajan
i can suggest to write a program to rewrite the jcl before submitting it. As per my knowledge, there is no existing tool available to do this.
Posted: Wed Jan 21, 2009 7:06 pm
by dbzTHEdinosauer
you are already using IKJEFT.., write a REXX script to modifiy the JCL (your symbolic substitution values) and then sub the modified jcl thru the rexx.
Posted: Thu Jan 22, 2009 11:13 am
by Anuj Dhawan
Hi,
Can you please show how you are using your symbolics & to what do you change them?
Posted: Fri Jan 23, 2009 2:53 pm
by pratik Ranjan
Hi Anuj,
Actually in all the JCLs, So many Symbolics are used, but i am just giving one example below.
JCL1:
//JOB CARD
// SET DATASET1='PRATIK.DATA1.090123',DATE=090123
.
.
.
//DD1 DD DSN=&DATASET1.,DISP=...
//DD2 DD DSN=IBMPTDV.D&DATE.,DISP=NEW...
.
.
.
---------------------------------------------------
JCL2:
//JOB CARD
// SET DATASET1='PRATIK.DATA.090123',DATE=090123
.
.
.
//INDATA1 DD DSN=&DATASET1.,DISP=...
//INDATA2 DD DSN=IBMPTDV.D&DATE.,DISP=....
//OUTDATA DD DSN=IBMPTDV.OUTPUT.D&DATE,DISP=NEW...
.
.
---------------------------------------------------------------------------------------------
And similar types are used in all other JCls also. So i just wanted keep all the 'SET' Statements in a dataset and get it copied in all the JCls, so that changing the value at one place will serve the purpose.
Thanks.
Posted: Sun Feb 01, 2009 12:23 pm
by Anuj Dhawan
Hi,
May be you can write all the "SET" statements in a member of some PDS & then include that PDS in all the JCLs.
Posted: Tue Feb 03, 2009 5:27 pm
by pratik Ranjan
Hi Anuj,
That's exactly what i want to do. But could you please suggest, how we can include a PDS in a JCL, because i am not aware of any such option in a JCL.
Thanks.
Posted: Wed Feb 04, 2009 11:33 am
by Anuj Dhawan
Hi,
I'm not very sure about your situation yet, however, may be you can try someting like this:
On PROC EXEC level, define something like, say Datalib:
Code: Select all
//Procname PROC
// DATALB='Pratik.PROD.DATALIB'
and in the "body" of every PROC, code something like:
Code: Select all
//include DD DSN=&DATALB(member)
You may have differnt SET-varaibles in differnt members, but once they are "included" in all the PROCs, later you just need to change members & all the PROCs will have those changes.
Hope this helps...
Posted: Thu Feb 05, 2009 6:02 pm
by pratik Ranjan
Thanks very much Anuj...I was not aware of the INCLUDE option in JCLs. I thought that, the INCLUDE option is valid only in case of SORT utility.
Posted: Thu Feb 05, 2009 6:17 pm
by Anuj Dhawan
Hi,
In my last post "include" was just other DD name, please don't consider it as "reserved keyword" - it was used only for representational purpose.
INCLUDE IN JCL
Posted: Thu Feb 05, 2009 6:34 pm
by Natarajan
INCLUDE keyword in jcl used as follows...
Code: Select all
//STEP1 EXEC PGM=COBOL1
//STEPLIB INCLUDE MEMBER=pdsmembername
it will include the member from the pds's.