View previous topic :: View next topic
|
Author |
Message |
nal_satish
New User
Joined: 20 Jun 2005 Posts: 26 Location: Hyderabad
|
|
|
|
Hi ,
How data Passed through PARM
parameter in JCL handled in PL/I Program ?
Syntax please
Satish. |
|
Back to top |
|
|
shinjini_t
New User
Joined: 11 May 2005 Posts: 14 Location: Bangalore, India
|
|
|
|
Hi Satish,
In the JCL you can pass the parameters as a control card or you can use teh PARM option.
And in the PL/1 code you can recieve it in the module like this.
Example:
ADORATM: -
PROC(THREE_YR_RET_ARRAY,YR_PARM) REORDER;
DCL -
1 THREE_YR_RET_ARRAY(19) CONN,
++INCLUDE ADRETTOP
DCL
YR_PARM PIC'9999';
and then when you run the step in the JCL then automatically your parms which you have passed in the JCL will come into THREE_YR_RET_ARRAY and YR_PARM and you can use it in your module for further processing.
Thanks & Regards,
Shinjini |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Hi Sathish,
Here you go.
Syntax for PARM in JCL:-
//step1 EXEC PGM=pgm1,PARM='Hello'
PL/I code to receive PARM data from JCL.
pgm1: PROC(PARM) OPTIONS(MAIN);
DCL PARM CHAR(10) VARYING;
Shinjini's code:
Example:
ADORATM: -
PROC(THREE_YR_RET_ARRAY,YR_PARM) REORDER;
DCL -
1 THREE_YR_RET_ARRAY(19) CONN,
++INCLUDE ADRETTOP
DCL
YR_PARM PIC'9999';
My comments:
(1) It doesn't look like a MAIN program.I don't think,value could be passed from JCL PARM option to a SUB program.
(2)In THREE_YR_RET_ARRAY(19) declaration, what does CONN mean? Hope it doesn't mean CONTROLLED storage(CTL).
(3)What is the need for showing INCLUDE here,in this example?
Do correct me for mistake(s),if any.
Thanks!
Sridevi. |
|
Back to top |
|
|
angelalpe Warnings : 1 New User
Joined: 22 Sep 2005 Posts: 32
|
|
|
|
Hi,
How data Passed through PARM parameter in JCL handled in PL/I Program with DB2?
Thanks |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Whatever data is input by PARM parameter in JCL is used in the PL/1 pgm as such or as usual, no matter if DB2 is used or not.Let us know if you are looking for something more specific.
Regards,
Sridevi. |
|
Back to top |
|
|
|