How to get parameter values in COBOL?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to get parameter values in COBOL?

Postby RajendraPrabhuS » Thu Jul 23, 2009 11:48 am

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. :?:
RajendraPrabhuS
 
Posts: 33
Joined: Mon Jul 20, 2009 4:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get parameter values in COBOL?

Postby expat » Thu Jul 23, 2009 11:52 am

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.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: How to get parameter values in COBOL?

Postby RajendraPrabhuS » Thu Jul 23, 2009 4:28 pm

Thanks Expat, Can Anyone please make sure the above question...?
RajendraPrabhuS
 
Posts: 33
Joined: Mon Jul 20, 2009 4:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get parameter values in COBOL?

Postby swd » Thu Jul 23, 2009 5:29 pm

It is the Linkage section,

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

Cheers
Steve
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: How to get parameter values in COBOL?

Postby RajendraPrabhuS » Thu Jul 23, 2009 5:39 pm

Very Thanks Steve... How many characters we can pass at the max? (I asking for the length of PARM)??
RajendraPrabhuS
 
Posts: 33
Joined: Mon Jul 20, 2009 4:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get parameter values in COBOL?

Postby swd » Thu Jul 23, 2009 5:49 pm

I believe 100 is the limit.
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: How to get parameter values in COBOL?

Postby RajendraPrabhuS » Thu Jul 23, 2009 6:24 pm

Thanks Steve..
RajendraPrabhuS
 
Posts: 33
Joined: Mon Jul 20, 2009 4:54 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post