I don't have a solution for the string comparison issue, but the DISP=NEW issue I can tell you with confidence "just works" under JES2. For either a COND= or an IF bypass of a step, all of the DD's are bypassed and no allocation error occurs. I use this feature all the time in my testing.
For JES3 I'm not sure if it works the same, someone with JES3 experience will have to advise you on that. HTH Peter P.S. -- I tried the following trick for string compares but the return code is still 0 and not 4 as one might hope: // SET S1=ABCD // SET S2=DEFG //* //TESTSTR EXEC PGM=AOPBATCH,REGION=32M, // PARM='awk BEGIN {if ("&S1" == "&S2") exit 0; else exit 4}' //STDOUT DD SYSOUT=*,RECFM=VA,LRECL=250,BLKSIZE=254 //STDERR DD SYSOUT=* //STDIN DD DUMMY //* -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Friday, May 13, 2016 12:40 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Suggestion for conditioning step on symbols 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 ... ? Charles -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN