View previous topic :: View next topic
|
Author |
Message |
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
No need to Yell...
....PROC(PARM) OPTIONS(MAIN) ...
DCL PARM CHAR(100) VAR; |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
You MUST use "EXEC PGM=pgmname,PARM='/........'
Without that slash also, it's working fine... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Thanks for your nice informaion, E.S |
|
Back to top |
|
|
|