View previous topic :: View next topic
|
Author |
Message |
venkateshbagayat
New User
Joined: 04 Mar 2005 Posts: 10
|
|
|
|
Hi Everybody..,
This is Venkat a Novice in Mainframe Technology. Can anybody help me out in understanding the PARM Parameter thoroughly please?
regards...,
Venkat |
|
Back to top |
|
|
ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
Hi Venkat,
This is Reddy. PARM parameter is used to pass data from JCL to COBOL. we can pass maximum of 100 CHARS using PARM parameter. If it exceeds 100 chars we need to use Instream data ( //SYSIN DD *).
This data we can receive in to COBOL by using a variable declared in LINKAGE SECTION. this can be done as follows
PROCEDURE DIVISION USING VARX.
VARX - is a linkage section variable which receives the data from PARM
PASS data in JCL as follows...
//STEP01 EXEC PGM=DEMO,PARM="DATATOPASS"
Bye,
Reddy. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Venkat,
To followup what Reddy has already said, the parm data passed to the pgm from the JCL should be defined in the pgm as such:
LINKAGE SECTION.
01 PARM-DATA.
05 PARM-LEN PIC S9(004) COMP.
05 PARM-STRING PIC X(010).
The length of the data passed is contained in PARM-LEN, the data itself is contained in PARM-STRING.
You can test the length as part of the verification process. |
|
Back to top |
|
|
|