Page 1 of 1

Pass value from one JCL to the sym parm in another JCL

PostPosted: Thu Aug 28, 2014 5:13 pm
by hariharan_bk
Hi All,

Need a help about how to pass value to symbolic parm in another JCL

Value from JCL 1 ---> sym parm in JCL2


Following are the sym variables defined in JCL2

//&JOBNAME JOB ...
// MSGCLASS=Z,CLASS=U,NOTIFY=&USER   
...
//SORTIN   DD DSN=&INPUTFIL,
...
//STEP07.PDF  DD  DSN=ACCTTEST.EXSTREAM.PDFOUT.R&RRR.C&CCC..XXX,
...


Following is how we are triggering JCL2 from JCL1
//SUBMIT2 EXEC PGM=IEBGENER 
//SYSUT1 DD DISP=SHR,DSN=XXXXXX.XXX.DONTUIM.JCLS(TESTUIM)   
//SYSUT2 DD SYSOUT=(B,INTRDR)                                 
//SYSPRINT DD DUMMY                                           


What changes should we make in the above code, so as to pass the value to JCL2, while triggering from here ? Please help us here

Re: Pass value from one JCL to the sym parm in another JCL

PostPosted: Fri Aug 29, 2014 5:39 pm
by NicC
How do these snippets relate to each other? And how do they relate to your problem, which is not clearly stated or demonstrated?
What changes have you tried? BTW - it looks as though you are showing a job submission not a job 'triggering' - whatever you mean by that.
Assuming you are trying to submit a job from amother by means of the IEBGENER shown then your job to be submitted must be set up with its complete JCL before the step executes. That means that the job must be set up programmatically in a prior step. However, I believe you can do it all in one using DFSort. Search that section of the forum for any examples.

Re: Pass value from one JCL to the sym parm in another JCL

PostPosted: Sat Aug 30, 2014 11:11 am
by hariharan_bk
My question is very simple. Which is....

How can we pass values from one JCL to the symbolic parameters defined in another jcl... I am calling a JCL (let's say JCL2)from a step of JCL1 using iebgener. This s shown in snippet posted earlier. Another snippet shows the sum parm declaration in JCL2

Re: Pass value from one JCL to the sym parm in another JCL

PostPosted: Sat Aug 30, 2014 12:19 pm
by BillyBoyo
Unfortunately you lack sufficient experience to know different than you have written.

What you a doing is copying one file to the internal reader. While doing this, there will be no symbol substitution at all, and there can be no symbol substitution.

Which release of z/OS are you running?

Re: Pass value from one JCL to the sym parm in another JCL

PostPosted: Tue Sep 09, 2014 6:46 pm
by hariharan_bk
Thanks all for your responses and patience. I might have tried somehting which is impossible.

Re: Pass value from one JCL to the sym parm in another JCL

PostPosted: Fri Sep 12, 2014 6:20 pm
by abki
If both JCL is in same submit u can try to make an instream proc.

Re: Pass value from one JCL to the sym parm in another JCL

PostPosted: Mon Sep 15, 2014 2:29 am
by NicC
...it u ca...

This is not a chat forum but a professional forum - please do not use chatroom/sms type phrases - in this case YOU not U.