Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to pass two parameters from JCL to PL1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 158
Location: India

PostPosted: Tue Aug 25, 2009 3:20 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Aug 25, 2009 3:29 pm    Post subject: Reply to: how to pass two parameters from JCL to PL1
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: 158
Location: India

PostPosted: Tue Aug 25, 2009 3:46 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Aug 25, 2009 3:55 pm    Post subject: Reply to: how to pass two parameters from JCL to PL1
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: 158
Location: India

PostPosted: Tue Aug 25, 2009 4:08 pm    Post subject:
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    Post subject: REG: Calling main program from main program
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    Post subject: RG: Passing two or more values
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: 158
Location: India

PostPosted: Wed Aug 26, 2009 9:52 am    Post subject:
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: 1027
Location: Oostende, Belgium

PostPosted: Wed Aug 26, 2009 10:57 am    Post subject:
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: 158
Location: India

PostPosted: Wed Aug 26, 2009 11:01 am    Post subject:
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: 1027
Location: Oostende, Belgium

PostPosted: Wed Aug 26, 2009 11:36 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Aug 26, 2009 12:49 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us