Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us