Allen, based on your example, if you leave your IF statement as is, and code STEPC and STEPD with ,COND=(0,NE) then if A gets the U0111, the steps inside the IF/ENDIF are executed. If B then abends or returns anything other than 0, C and D are flushed.
I think we can easiy use a combination of COND statements and IF/ENDIF, leveraging the strengths of each where appropriate. *don* On Mon, Jun 6, 2011 at 9:30 PM, Gainsford, Allen <[email protected]>wrote: > Mike Schwab said: > > > > COND only works with ONLY or EVEN, not a specific abend code. > > Have you tried > > // IF (proc.step.rc EQ U111) THEN > > to see if it works? > > Yes. Please see my original post. The problem is that if I code: > > //STEPA EXEC PGM=... > // IF (STEPA.RUN=TRUE OR STEPA.ABENDCC=U0111) THEN > //STEPB EXEC PGM=... > //STEPC EXEC PGM=... > //STEPD EXEC PGM=... > // ENDIF > > then, if STEPA abends with U111, STEPB will execute. But if STEPB also > abends, then STEPC and STEPD will still execute, even though they're not the > subject of the IF. I want a way to force STEPC and STEPD to be flushed if > STEPB abends. > > The only way I've found so far is to surround STEPC and STEPD with their > own IF statements, so that STEPC only runs if STEPB explicitly ran and did > not abend, and STEPD only runs if STEPC explicitly ran and did not abend. > This is long-winded, tedious, and over-complex. But so far I haven't been > able to find another way. > > Regards, > Allen > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

