View previous topic :: View next topic
|
Author |
Message |
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi,
I have a program "PGM1: PROC(a,b) OPTIONS(MAIN);" and i want to pass values to this program.
Please let me know how can i pass two/more values. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what gets passed to pl1 ( or to any program ) thru the JCL parm keyword is a single char string
You have to devise a method to parse it in order to get every token that You define as parm |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Since I do not have access to JCLs in my system I am not able to see how they are passing values to above mentioned program.
Please clarify on question "Can we call any Main program from some other main program?" |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Since I do not have access to JCLs in my system I am not able to see how they are passing values to above mentioned program. |
Yo asked a question I gave You an answer, what is that is not clear ???
the generic format to pass a parameter to a program is ...
Code: |
//stepname EXEC PGM=pgmname,PARM='somestringupto100chars' |
or
Code: |
//stepname EXEC PGM=pgmname,PARM='/somestringupto99chars' |
depending on the PL1 customization parameters
how the somestringupto100chars or the somestringupto99chars
are processed is complely application dependent and cannot be determind by a forum questions and answers session |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Thank you very much, |
|
Back to top |
|
|
sai.dara
New User
Joined: 24 Aug 2007 Posts: 12 Location: Hyderabad
|
|
|
|
Hi Satish,
You can not call a main program from a main program in PLI.
Thanks,
Sai |
|
Back to top |
|
|
sai.dara
New User
Joined: 24 Aug 2007 Posts: 12 Location: Hyderabad
|
|
|
|
Hi Satish,
If you want to pass two or more values to you PLI program use this code
//SYSIN dd *
ABCDEFG/IJKLMANOP
what you do in your PLI program is use substr and devide the single string nito two or more strings.
will this serve your purpose. If not let me know.
Thanks,
Sai |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi Sai,
Your method also saying that pass one value and split it inside the program. What I am asking is I have a program in my project as "PGM1: PROC(a,b) OPTIONS(MAIN);".
Here PGM1 is receiving two values from a JCL and I do not have that jcl. This program is assigned to me for analysis and here I structed how two values are coming to this program.
If you are not clear with my question, please let me know I will explain in detail. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
It's not called by JCL, but might be a CICS or IMS program. See the explanation of the "SYSTEM" compiler option in the manual! |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi Prino,
Can you please provide manual link?
Thanks in Advance! |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
satish.ms10 wrote: |
Can you please provide manual link? |
Lazy git, do something yourself for a change. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
satish.ms10 wrote: |
Hi Sai,
Your method also saying that pass one value and split it inside the program. What I am asking is I have a program in my project as "PGM1: PROC(a,b) OPTIONS(MAIN);".
Here PGM1 is receiving two values from a JCL and I do not have that jcl. This program is assigned to me for analysis and here I structed how two values are coming to this program.
If you are not clear with my question, please let me know I will explain in detail. |
the question is clear even if wrong ...
from jcl You cannot receive two values
Your understanding of how jcl works is confused...
review
jcl reference, pl1 programming guide and reference
reread my first post for the snippet |
|
Back to top |
|
|
|