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 get the parm data or sysin data from JCL to PL/1?

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

New User


Joined: 02 Mar 2006
Posts: 6

PostPosted: Fri Mar 03, 2006 6:53 pm    Post subject: How to get the parm data or sysin data from JCL to PL/1?
Reply with quote

How to get the parm data or sysin data from JCL to PL/1?

PLease help me

Regards,
Ashok.D
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Mar 03, 2006 7:18 pm    Post subject: Re: How to get the parm data or sysin data from JCL to PL/1
Reply with quote

Interesting. Two posts on the exact same subject in the same week:

http://www.ibmmainframes.com/viewtopic.php?t=9435&highlight=

Now, I don't know the answer, but one would think that it's probably easy to find with a simple Internet search, such as the following:

http://www.users.bigpond.com/robin_v/plistuff.htm

which contains this text:
Quote:

Parameter Passing to a Program Using JCL
JCL Parameters (PARM=) are a good way to pass control information to programs. Use them for simply overriding control, not as a replacement for a series of control cards. Also avoid the switch string of ones and zeros. Leave that to the Assembler programmers.

Some examples are for if the program is running in test or production, having a purge-all feature in a housekeeping program, or to turn on tracing. Think about having the default be the absence of a parameter. Also use the INDEX function to search for control strings to avoid positional errors.


//AQUA01E JOB
//*-------------------------------------------------------------------*
//* STEP01 - EXECUTE PROGRAM KK3100 FOR TEST DATA ONLY *
//*-------------------------------------------------------------------*
//STEP01 EXEC PGM=KK31001,REGION=4096K,PARM='/DEBUG'

read DEBUG into the program from the PARM= above

PASSIT: PROC(PARMIN) OPTIONS(MAIN);

DCL PARMIN CHAR(100) VARYING;



PARMIN will have the string '/DEBUG?'. I = INDEX(PARMIN,'DEBUG'); tells there is a DEBUG and the location.

A parameter passed to the program is the classic example of a variable-length character string. In other words, it is a variable where the length is not known until execution time. The idea of testing parameter variables by looking for the string instead of at a specific location has a couple of advantages:

You can have free-form input for more than one value.

After all, no one remembers what the program needs when enhancing the production JCL.



and/or that it would be documented in the programmer's guide manuals.
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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