Page 1 of 1
Help in creating a PARM using COBOL.
Posted: Thu Oct 15, 2015 1:52 pm
by utkarsh
Hi,
Can someone please suggest if it is possible to create a parm variable using COBOL program and pass it to the next step of the JCL? I need to create a PARM variable in one step and use it in the following step.
Thanks,
Re: Help in creating a PARM using COBOL.
Posted: Thu Oct 15, 2015 3:25 pm
by William Collins
No, you can't do that.
Unless your level of z/OS supports PARMDD. Then you may be able to.
Why don't you just write the data to a dataset, and read that in the next program anyway?
Re: Help in creating a PARM using COBOL.
Posted: Thu Oct 15, 2015 5:46 pm
by Robert Sample
When a job is submitted, the first thing that happens (from the programmer's point of view) is that the job goes through the converter / interpreter which expands INCLUDE and PROC references, among other things. Once a job has gone through the C/I, it is not possible to change that job's JCL -- PERIOD. You can create the PARM and submit another job through the internal reader that uses the PARM, or -- maybe -- use PARMDD, but as William suggested your best bet is to write the data into a data set and read it in the next step (assuming you are not using a utility in that step).
Re: Help in creating a PARM using COBOL.
Posted: Thu Oct 22, 2015 9:58 am
by utkarsh
Thanks. I've used the suggestion of creating a intermediate dataset.