Help in creating a PARM using COBOL.

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Help in creating a PARM using COBOL.

Post 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,
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Help in creating a PARM using COBOL.

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Help in creating a PARM using COBOL.

Post 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).
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: Help in creating a PARM using COBOL.

Post by utkarsh »

Thanks. I've used the suggestion of creating a intermediate dataset.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”