How to pass the parameter in PARM using LINKAGE SECTION ? (syntax)?

Questions by kapilymca

Showing Answers 1 - 16 of 16 Answers

balaji

  • Nov 24th, 2006
 

The syntax for passing values is

//step1 exec pgm='pgm1' parm='x y z'

this is simple jcl code

and the corresponding cobol for this is

linkage section

01 parmval

05 parmval-len pic s9(4)

05 parmval-txt pic(100)

procedure division using parmval

this is the corresponding cobol code

ranjith kumar

  • Mar 16th, 2012
 

Code
  1. //step  exec  pgm=parms ,parm=5354435212

  2. under linkage section

  3. 01 stud-rec.

  4.    02 length pic x(3).

  5.    02stu-roll pic x(10).

  6.  procedure division.

  7.    display length.

  8.    display stu-roll.

  9.    stop run.

  10. output is:

  11.    length is :10

  12.    stu-roll   :5354435212

  13.  

  Was this answer useful?  Yes

raghava

  • Apr 12th, 2012
 

In jcl:

Code
  1. step1 execf pgm=xyz,parm=raghava


in cobol :

Code
  1. linkage section

  2.                 05 ln-var.

  3.                      10 ln-temp pic x(10).

  4.              procedure division using ln-var.

  Was this answer useful?  Yes

satya valluru

  • Jun 5th, 2012
 

JCL:
//STEP1 EXEC PGM=SAMPLE,PARM=SATYA

COBOL:

LINKAGE SECTION.

01 PARM-VALUE.
05 PARM-LENGTH PIC S9(2) COMP-----it will store length of data we are passing from JCL
05 PARM-DATA X(10) -------------will store actual data we passed.

PROCEDURE DIVISION USING PARM-VALUE.

  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