Try this ... //***** SAVE CURRENT VALUE OF MYSYM // SET SAVESYM=&MYSYM //***** SET MYSYM TO A NEW VALUE // SET MYSYM='NEWVAL'
... //***** RESTORE MYSYM // SET MYSYM=&SAVESYM Probably not the answer you wanted, but it works. Another possibility is to take advantage of the fact that symbols that are SET within a PROC automatically revert to their former value after the PROC terminates. Example: 2 // SET MYSYM1='INITVAL1' 3 // SET MYSYM2='INITVAL2' //********************************************************************* 4 //MYPROC01 PROC MYSYM1='DFLTVAL1' //P1STEP01 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) // PEND //********************************************************************* 5 //MYPROC02 PROC MYSYM1='DFLTVAL1' //P2STEP01 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) // SET MYSYM1='PROCVAL1' // SET MYSYM2='PROCVAL2' //P2STEP02 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) // PEND //********************************************************************* 6 //JSTEP001 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM=(INITVAL1,INITVAL2) 7 //JSTEP002 EXEC MYPROC01 8 ++MYPROC01 PROC MYSYM1='DFLTVAL1' 9 ++P1STEP01 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM=(DFLTVAL1,INITVAL2) 10 //JSTEP003 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM=(INITVAL1,INITVAL2) 11 //JSTEP004 EXEC MYPROC02 12 ++MYPROC02 PROC MYSYM1='DFLTVAL1' 13 ++P2STEP01 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM=(DFLTVAL1,INITVAL2) 14 ++ SET MYSYM1='PROCVAL1' 15 ++ SET MYSYM2='PROCVAL2' 16 ++P2STEP02 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM=(PROCVAL1,PROCVAL2) 17 //JSTEP005 EXEC PGM=IEFBR14,PARM=(&MYSYM1,&MYSYM2) IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM=(INITVAL1,INITVAL2) HTH, Bill Bass United HealthCare Greenville, SC -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Tuesday, July 17, 2012 5:08 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Unsetting a JCL symbol. Just curious. Once a JCL symbol has been set, is there any way subsequently to restore it to exactly the state and behavior it had before it was set? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN