Hi,
Can anyone help me to resolve the following issue.
"How to set a default value for a symbolic parameter ?"
The JCL is something like this:
-------------------
// .. JOB ....
//* here i have to give some value to file name before running this JCL
// set filename=
//step1 exec PGM1,...........
//...........
//FILE1 dd dsn=abcd.zyxw..&filename, ............
//................
//..................
----------------------
Now the case is , if before running this JCl if I am setting some value for filename, then FILE1 will refer to that dataset.
But if filename is blank then , I want a default value DDDDD to be set to it.
How to achieve this..
how to set default value for any symbolic parameter.
Moderators: Frank Yaeger, DikDude, Moderator Group
how to set default value for any symbolic parameter.
--There is no limit to learning
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
This goes on the PROC statement:in the proc, set your default value.
Code: Select all
//RUNPGM1 PROC &FILNAM=DDDDD
Code: Select all
//FILE1 DD DSN=abcd.zyxw..&filename, ............
Code: Select all
PEND
To execute this proc using the default:
Code: Select all
//DOIT EXEC RUNPGM1,FILNAM=
Code: Select all
//DOIT EXEC RUNPGM1,FILNAM=thevalue
Have a good one
Thanks dbzTHEdinosauer and DikDude for explaining.
But i was actually looking for an option in JCL where we can handle this case when the filename is not given instead of commenting it out is there any other option.
Because when this JCL moves to production, I want the JCL itself to handle this scanerio instead of asking them to either give the filename or give the default value or comment it out. That's why am looking for any way JCL itself can handle it.
I know IF/ELSE will not work here, but theoritically I am looking for something like this
// If filename=' ' then
//want to set filename=DDDD here
// else
// filename=&filename.
Is there a way to achieve this objective.
But i was actually looking for an option in JCL where we can handle this case when the filename is not given instead of commenting it out is there any other option.
Because when this JCL moves to production, I want the JCL itself to handle this scanerio instead of asking them to either give the filename or give the default value or comment it out. That's why am looking for any way JCL itself can handle it.
I know IF/ELSE will not work here, but theoritically I am looking for something like this
// If filename=' ' then
//want to set filename=DDDD here
// else
// filename=&filename.
Is there a way to achieve this objective.
--There is no limit to learning
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page