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

Passing Parameters to PLI


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

Active Member


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

PostPosted: Wed Nov 28, 2007 1:46 pm
Reply with quote

Hi all,

Is it possible to pass a parameter from JCL to a PLI program with the use of the "PARM=" keyword with the EXEC statement??? (instead of using SYSIN).

Please clarify me.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 28, 2007 1:57 pm
Reply with quote

Yes it is!
but beware...

usually You use "EXEC PGM=pgmname,PARM='........'

for PL/1 programs
You MUST use "EXEC PGM=pgmname,PARM='/........'

notice the slash,
the string before the slash are PL/I related runtime parms,
and PL/1 will pass to Your program the part after the slash

the field for the parm string MUST be declared as CHAR VAR
Back to top
View user's profile Send private message
Gnanas N

Active Member


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

PostPosted: Wed Nov 28, 2007 2:07 pm
Reply with quote

It's okay, Enrico Sorichetti.

But, how to get the passed parameter in PL1. If COBOL means, We use Linkage Section and data name defined in that section.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 28, 2007 2:41 pm
Reply with quote

No need to Yell...

....PROC(PARM) OPTIONS(MAIN) ...
DCL PARM CHAR(100) VAR;
Back to top
View user's profile Send private message
Gnanas N

Active Member


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

PostPosted: Wed Nov 28, 2007 3:53 pm
Reply with quote

You MUST use "EXEC PGM=pgmname,PARM='/........'

Without that slash also, it's working fine...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 28, 2007 3:59 pm
Reply with quote

Again no need to yell,
( that' s what bolding out things mean )

I gave You the most general answer,

PL/1 runtime also might need parms passed to it,
and the slash is the way of separating them
Back to top
View user's profile Send private message
Gnanas N

Active Member


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

PostPosted: Wed Nov 28, 2007 4:08 pm
Reply with quote

Thanks for your nice informaion, E.S
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 Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts Injecting HTTPHEADER parameters in th... PL/I & Assembler 0
No new posts Passing parm from JCL to Assembler, b... PL/I & Assembler 2
No new posts passing symbolic parameters through d... JCL & VSAM 3
Search our Forums:

Back to Top