It worked, once I un-fat-fingered it. Thanks again,

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Bill Godfrey
Sent: Friday, May 13, 2016 1:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Suggestion for conditioning step on symbols

On Fri, 13 May 2016 09:39:43 -0700, Charles Mills wrote:

>I know this has been kicked around before but I don't have a good 
>answer off the top of my head and I don't know exactly how to Google for the 
>answer.
>
>Does anyone have suggestions for conditioning a jobstep on &symbol1 != 
>&symbol2? I know that COND= and IF are only on return codes and similar 
>things, not character strings.
>
>I could write Rexx that would compare two symbols (or evaluate a 
>complex
>expression) and set a return code -- is that the best approach? Or is 
>there something off the shelf that would have the same effect? I have a 
>feeling someone here knows a clever hack.
>
>Complicating life is that part of what I need to bypass if &symbol1 ==
>&symbol2 is a DD with DISP=NEW. Can IF bypass an entire step including 
>DDs (such that DISP=NEW for an existing dataset will not cause errors)? 
>The examples do not show that. If not, do I solve that by putting the 
>DD (and EXEC PGM=) in a PROC and IF/ELSE executing one of two 
>alternative PROCs? Or ... ?

One way to set a return code, on systems that allow in-stream substitution 
(z/OS 2.x JES2)

// EXPORT SYMLIST=(PARM1,PARM2)
// SET PARM1=FOO
// SET PARM2=BAR
//COMPARE EXEC PGM=IEBCOMPR
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD *,SYMBOLS=JCLONLY
&PARM1
//SYSUT2   DD *,SYMBOLS=JCLONLY
&PARM2
//SYSIN    DD DUMMY

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to