Passing Multiple PARM in JCL



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

Passing Multiple PARM in JCL

Postby Sushmita V » Wed Feb 08, 2012 3:51 pm

Hi,

Please let me know how to declare multiple PARM in JCL.
I have my declaration in COBOL as below:

LINKAGE SECTION.
01 MLR-PARM-WORK-AREA1.
05 MLR-PARM-LENGTH1 PIC S9(4) COMP.
05 MLR-PARM-DATA-AREA1.
07 MLR-PARM-DATA1 PIC X(20).
07 MLR-PARM-DATA2 PIC X(15).
07 MLR-PARM-DATA3 PIC X(1).
07 MLR-PARM-DATA4 PIC X(15).
01 MLR-PARM-WORK-AREA2.
05 MLR-PARM-LENGTH2 PIC S9(4) COMP.
05 MLR-PARM-DATA-AREA2.
07 MLR-PARM-DATE1 PIC 9(08).

PROCEDURE DIVISION USING MLR-PARM-WORK-AREA1 MLR-PARM-WORK-AREA2.

Please let me know if am going wrong anywhere.

Thanks & REgards,
SV
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: Passing Multiple PARM in JCL

Postby BillyBoyo » Wed Feb 08, 2012 4:25 pm

Sorry, it doesn't work like that.

PARM="A                   B              CD              "


comes into you Cobol program as length 7 in two-byte binary, then

01 MLR-PARM-WORK-AREA1.
    05 MLR-PARM-LENGTH1 PIC S9(4) COMP.
    05 MLR-PARM-DATA-AREA1.
        07 MLR-PARM-DATA1 PIC X(20).
        07 MLR-PARM-DATA2 PIC X(15).
        07 MLR-PARM-DATA3 PIC X(1).
        07 MLR-PARM-DATA4 PIC X(15).


That is a poor way to do the parm, as it relies on the thing being typed entirely correctly. Use a seperator, like

A,B,C,D


and process it in your program. It'll save a lot of hassle.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post