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.
Can you search IBM-MAIN archives itself? Of course, you may try out different
search arguments...
>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.
Ouch, that's a hard one... If I get that baby, I will not sleep for a long
time...
>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?
Automation and REXX can do that. Or you can program something to check
something and set a RC based on what you find.
>I have a feeling someone here knows a clever hack.
Careful, you may get spam with expensive solutions ...
>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
... ?
Try this fun thing to check if a DSN is there or not, not exactly what you want
but you should get a start for now:
//SPFPDF EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF NOPREF
LISTDS ???.JCL
IF &SYSDSN('???.JCL') = OK THEN +
DO
WRITE DATASET FOUND
SET &RC = 0
END
ELSE +
DO
WRITE DATA SET NOT FOUND
SET &RC = 4
END
HTH!
Groete / Greetings
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN