IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to pass parameters from JCl to PL1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prabha
Warnings : 2

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Thu Feb 21, 2008 12:49 pm
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Feb 21, 2008 1:24 pm
Reply with quote

Please search first.

See this previous topic.
Back to top
View user's profile Send private message
Prabha
Warnings : 2

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Thu Feb 21, 2008 3:38 pm
Reply with quote

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

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Feb 21, 2008 9:26 pm
Reply with quote

Declare PARM as pointer since OPTIONS(BYVALUE) is in effect.

Please correct me if I am wrong.
Back to top
View user's profile Send private message
Prabha
Warnings : 2

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Fri Feb 22, 2008 3:50 pm
Reply with quote

Thanks.. It worked..
How to pass more than one parameter value..
I need to pass two values like value1 and value2.

'
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Feb 22, 2008 4:52 pm
Reply with quote

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

New User


Joined: 14 Sep 2006
Posts: 71
Location: Bangalore

PostPosted: Mon Mar 24, 2008 3:15 pm
Reply with quote

What does this 'BYVALUE' stand for?
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Mon Mar 24, 2008 3:51 pm
Reply with quote

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

New User


Joined: 14 Sep 2006
Posts: 71
Location: Bangalore

PostPosted: Mon Mar 24, 2008 3:54 pm
Reply with quote

Thank you .......
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Injecting HTTPHEADER parameters in th... PL/I & Assembler 0
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
Search our Forums:

Back to Top