Page 1 of 1

How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 11:48 am
by RajendraPrabhuS
Hi, I am having a JCL where in I am passing a set of values to COBOL using PARM.

For Eg., //COBCAL EXEC PGM=PSWRITE,PARM="1004 NEERAJ KUMAR 25 10000"

1004 - EMPLOYEE NO
NEERAJ KUMAR - EMPLOYEE NAME
25 - AGE
10000 - SALARY

In which section do we need to define the parameter variables in COBOL and how to do?
Please any one help me. :?:

Re: How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 11:52 am
by expat
I believe that you need to define something in the Linkage section of the program.
It's over 25 years since I played COBOL, so things may have changed since then.

Re: How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 4:28 pm
by RajendraPrabhuS
Thanks Expat, Can Anyone please make sure the above question...?

Re: How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 5:29 pm
by swd
It is the Linkage section,

Look here http://www.simotime.com/cblpar01.htm

Cheers
Steve

Re: How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 5:39 pm
by RajendraPrabhuS
Very Thanks Steve... How many characters we can pass at the max? (I asking for the length of PARM)??

Re: How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 5:49 pm
by swd
I believe 100 is the limit.

Re: How to get parameter values in COBOL?

PostPosted: Thu Jul 23, 2009 6:24 pm
by RajendraPrabhuS
Thanks Steve..