Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Regarding PARM Parameter How is it interpreted in PLI

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
nal_satish

New User


Joined: 20 Jun 2005
Posts: 25
Location: Hyderabad

PostPosted: Tue Jul 19, 2005 9:52 am    Post subject: Regarding PARM Parameter How is it interpreted in PLI
Reply with quote

icon_question.gif
Hi ,

How data Passed through PARM
parameter in JCL handled in PL/I Program ?

Syntax please


Satish.
Back to top
View user's profile Send private message
References
shinjini_t

New User


Joined: 11 May 2005
Posts: 14
Location: Bangalore, India

PostPosted: Fri Jul 29, 2005 7:04 pm    Post subject: Re: Regarding PARM Parameter How is it interpreted in PLI
Reply with quote

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
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 107
Location: Concord, New Hampshire, USA.

PostPosted: Sat Oct 01, 2005 2:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 31

PostPosted: Tue Oct 25, 2005 8:35 pm    Post subject:
Reply with quote

Hi,

How data Passed through PARM parameter in JCL handled in PL/I Program with DB2?


Thanks
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 107
Location: Concord, New Hampshire, USA.

PostPosted: Wed Oct 26, 2005 1:30 am    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1