Here FWIW is a fragment of a working example:
//* Need to set a return code so we know whether to do the ASM and
//* OBJ copies, which we only want to do if new code base (&CSOURCE)
//* Sets RC=0 if equal, RC=8 otherwise
//COMPSRC EXEC PGM=IEBCOMPR
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *,SYMBOLS=JCLONLY
&PREVSRC
/*
//SYSUT2 DD *,SYMBOLS=JCLONLY
&CSOURCE
/*
//* Create the LST PDSE only if new ASM version
//MAKELST EXEC PGM=IEFBR14,COND=(0,EQ,COMPSRC) Bypass if compare =
//DDLST DD DSN=xxxxxx.&CSOURCE..LST,
// DCB=(xxxxxx.&PREVSRC..LST),
// DISP=(NEW,CATLG),SPACE=(CYL,(15,5,20)),DSNTYPE=LIBRARY
//* Create the load PDSE only if new code base or package
// IF (COMPSRC.RC NE 0 | COMPCZA.RC NE 0 ) THEN
//MKRLOAD EXEC PGM=IEFBR14
//DDLOAD DD DSN=&LOADLIB,
// DCB=(xxxxxx.&PREVSRC..&PREVPKG..LOADPDSE),
// DISP=(NEW,CATLG),SPACE=(TRK,(75,15,20)),DSNTYPE=LIBRARY
// ENDIF
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Binyamin Dissen
Sent: Monday, May 14, 2018 3:57 AM
To: [email protected]
Subject: Re: Using system symbols in JCL IF statement
IF does not support string comparisons.
What you can do is add a step that generates a return code based on the
symbol
value and use that return code in an IF statement.
On Mon, 14 May 2018 08:48:29 +0000 Gadi Ben-Avi <[email protected]> wrote:
:>Is it possible to use system symbols in a JCL IF statement?
:>So, for example, if I have a smbold called DR whos value is DR, I would
like to write:
:>// IF &DR=DR THEN
:> Do stuff for a DR system
:>// ELSE
:> Do stuf for the production system
:>// ENDIF
:>I am running z/OS v2.1
--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN