View previous topic :: View next topic
|
Author |
Message |
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
Hi,
Please let me know how to pass parameters from JCL to PL1. For that how we should define receving parameters in PL1. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
Thanks..!
I tried but getting error in compilation..Help me to solve this,
My program is :
TST1: PROC(PARM) OPTIONS(MAIN) REORDER;
DCL PARM CHAR(100) VAR;
PUT SKIP LIST(PARM);
END TST1;
Error is
SEVERE AND ERROR DIAGNOSTIC MESSAGES
IEL0570I S 2 'BYVALUE' PARAMETER 'PARM' MUST BE EITHER SCALAR POINTER ORR EAL FIXED BINARY(31,0).
WARNING DIAGNOSTIC MESSAGES
IEL0569I W 1 PARAMETER TO MAIN PROCEDURE CONFLICTS WITH THE SYSTEM COMPILER OPTION SPECIFICATION. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Declare PARM as pointer since OPTIONS(BYVALUE) is in effect.
Please correct me if I am wrong. |
|
Back to top |
|
|
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
Thanks.. It worked..
How to pass more than one parameter value..
I need to pass two values like value1 and value2.
' |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Only one PARM value can be passed. But you can pass two values in one with delimiter.
Substring the PARM in program into two(in your case).
Or use input file as values grow. |
|
Back to top |
|
|
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
What does this 'BYVALUE' stand for? |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
This info is from MVS QW.
When you specify BYVALUE, compiler puts the value of the argument in the parameter list.
When you specify BYVALUE, a dummy argument is not created; however, as is also true for dummy arguments, any change to the corresponding parameter in the called routine will not be visible in the calling routine.
BYVALUE can be specified only for scalar arguments and parameters that have lengths and sizes known at compile time.
Please see about BYADDR to contrast with BYVALUE. |
|
Back to top |
|
|
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
Thank you ....... |
|
Back to top |
|
|
|