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

how to pass two 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
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Tue Aug 25, 2009 3:20 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 25, 2009 3:29 pm
Reply with quote

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

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Tue Aug 25, 2009 3:46 pm
Reply with 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.

Please clarify on question "Can we call any Main program from some other main program?"
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 25, 2009 3:55 pm
Reply with quote

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

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Tue Aug 25, 2009 4:08 pm
Reply with quote

Thank you very much,
Back to top
View user's profile Send private message
sai.dara

New User


Joined: 24 Aug 2007
Posts: 12
Location: Hyderabad

PostPosted: Tue Aug 25, 2009 8:10 pm
Reply with quote

Hi Satish,

You can not call a main program from a main program in PLI.

Thanks,
Sai
Back to top
View user's profile Send private message
sai.dara

New User


Joined: 24 Aug 2007
Posts: 12
Location: Hyderabad

PostPosted: Tue Aug 25, 2009 8:14 pm
Reply with quote

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

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Wed Aug 26, 2009 9:52 am
Reply with quote

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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Aug 26, 2009 10:57 am
Reply with quote

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

Active User


Joined: 10 Aug 2009
Posts: 184
Location: India

PostPosted: Wed Aug 26, 2009 11:01 am
Reply with quote

Hi Prino,

Can you please provide manual link?

Thanks in Advance!
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Aug 26, 2009 11:36 am
Reply with quote

satish.ms10 wrote:
Can you please provide manual link?


Lazy git, do something yourself for a change.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Aug 26, 2009 12:49 pm
Reply with quote

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
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