Symbolic Parameters
Moderators: Frank Yaeger, DikDude, Moderator Group
Symbolic Parameters
Why would I want to code symbolic parameters when I could simply override parameters in a proc from a JCl?
Hi Kaitki,
A symbolic parameter is a variable within a cataloged procedure to which a value may be assigned by coding on the EXEC statement the name of the symbolic parameter and its desired value.
Here is the example JOB & PROC which tells you the importance of Symbolic variables.
//JOBNAME JOB 0,CLASS=X,MSGCLASS=0,NOTIFY=&SYSUID,REGION=0M,
//SETVAR SET ID=TT,BNK=K,TLQ=
//JCLLIB JCLLIB ORDER=(PROCLIB-NAME)
//*
//JSTEP010 EXEC PROC-NAME,
// LOADBZ=LOAD-LIB-NAME,PLAN=PLAN-NAME
//*
And the Procedure looks like
//BZU1000D PROC LOADBZ=LOAD-LIB-NAME, * PRODUCTION LOAD LIB NAME
// PLAN=PLAN-NAME * PRODUCTION PLAN NAME
//*
//STEP010 EXEC PGM=SORT
//SORTIN DD DSN=&ID.AB.TEST.INPUT,DISP=SHR
//SORTOUT DD DSN=&ID.AB.TEST.OUTPUT,DISP=SHR
//SYSIN DD DSN=&ID.AB.TEST.SRTCARD,DISP=SHR
//*
A symbolic parameter is a variable within a cataloged procedure to which a value may be assigned by coding on the EXEC statement the name of the symbolic parameter and its desired value.
Here is the example JOB & PROC which tells you the importance of Symbolic variables.
//JOBNAME JOB 0,CLASS=X,MSGCLASS=0,NOTIFY=&SYSUID,REGION=0M,
//SETVAR SET ID=TT,BNK=K,TLQ=
//JCLLIB JCLLIB ORDER=(PROCLIB-NAME)
//*
//JSTEP010 EXEC PROC-NAME,
// LOADBZ=LOAD-LIB-NAME,PLAN=PLAN-NAME
//*
And the Procedure looks like
//BZU1000D PROC LOADBZ=LOAD-LIB-NAME, * PRODUCTION LOAD LIB NAME
// PLAN=PLAN-NAME * PRODUCTION PLAN NAME
//*
//STEP010 EXEC PGM=SORT
//SORTIN DD DSN=&ID.AB.TEST.INPUT,DISP=SHR
//SORTOUT DD DSN=&ID.AB.TEST.OUTPUT,DISP=SHR
//SYSIN DD DSN=&ID.AB.TEST.SRTCARD,DISP=SHR
//*
Kumar
If u can dream it, U can do it.
If u can dream it, U can do it.
If you are using same variable multiple times in a PROC or JCL, symbolic parameters are preferred. By doing this, you no need to change in all the places.
E.g., You want to create datasets 1st node with your TSO ID, provide some name like PROD=TSO ID in EXEC statement or PROC statement and use it for multiple dataset by referring it with &PROD.
If some body else wants to execute this same PROC or JCL, they no need to change their TSO ID for each and every dataset but change at the declaration of Symbolic parameter.
E.g., You want to create datasets 1st node with your TSO ID, provide some name like PROD=TSO ID in EXEC statement or PROC statement and use it for multiple dataset by referring it with &PROD.
If some body else wants to execute this same PROC or JCL, they no need to change their TSO ID for each and every dataset but change at the declaration of Symbolic parameter.
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