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 File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 0 Tue Sep 26, 2017 3:35 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

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