JCL parm parameter

I am passing data from jcl using parm to COBOL-db2 program, where can u retrieve the passing data in COBOL-db2 program and where it stored?

Questions by rpg0247   answers by rpg0247

Showing Answers 1 - 9 of 9 Answers

Anji

  • Jul 20th, 2011
 

Parm valueS are supplied to linkage section variable in cobol program. Linkage section variable must defined with two low level variables, one is for length and 2nd for test data. max length for parm is 100 characters.

eg:

Code
  1. LINKAGE SECTION.

  2. 01 LK-VAR1.

  3.      10 LK-LENGTH   PIC 9(4) COMP VALUE ZERO.

  4.      10 LK-TEXT-      PIC X(100) VALUE SPACE.


  Was this answer useful?  Yes

ANJI

  • Jul 20th, 2011
 

Parm data can retrieved by linkage section variable. Cobol program procedure division defined like this..

Code
  1. PROCEDURE DIVISION USING LK-VAR1.

  2. .

  3. .

  4. .

  5. .

  6. STOP-RUN.

rasheeed17

  • Jan 19th, 2012
 

Whether it simple Cobol program or an COBOL-DB2 program.
passing PARM value & reading it with in program is same for both.

- We have to define an variable for PARM in linkage section
- LINKAGE SECTION.
01 LK-VAR1.
10 LK-LENGTH PIC 9(4) COMP.
10 LK-TEXT1 PIC X(100) VALUE SPACE.

LK-LENGTH --> length of the incoming string(PARM) is stored in this, you must define this variable as PIC 9(4) COMP

LK-TEXT1 --> this variable will contain the value you have passed.

Note: names of the variables can be any thing, it is better to prefix with LK-

Gunesh Asatkar

  • Feb 13th, 2013
 

The parm parameter is used to passed data from jcl to cobol program.
The max 100 character we can sent by parm parameter including special character.
And value get by code s9(4)comp var in linkage section

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions