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

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


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Fri Mar 03, 2006 7:18 pm
Reply with quote

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

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:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top