Symbolic Parameters

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
kaitki
Member
Posts: 4
Joined: Wed Mar 12, 2008 12:38 pm

Symbolic Parameters

Post by kaitki » Mon Mar 17, 2008 12:48 pm

Why would I want to code symbolic parameters when I could simply override parameters in a proc from a JCl?

mkk157
Member
Posts: 37
Joined: Wed Feb 07, 2007 2:00 pm
Location: Hyderabad

Post by mkk157 » Tue Apr 01, 2008 4:43 pm

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
//*
Kumar
If u can dream it, U can do it.

ksk
Member
Posts: 12
Joined: Mon May 12, 2008 3:06 pm

Post by ksk » Fri May 16, 2008 12:15 pm

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.

Post Reply

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



Other References
Mainframe Tools and others