> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dean Montevago
> Sent: Thursday, December 15, 2005 9:54 AM
> To: [email protected]
> Subject: Re: COND= on an EXEC Statement
> 
> 
> something like this ?
> 
> //STEP1               EXEC PROC1                 
> //TESTCC      IF (STEP1.RC <= 4) THEN    
> //STEP2               EXEC PROC2                 
> //                    ELSE                       
> //TESTEND     ENDIF                      
> //ABEND       EXEC PGM=ABEND,PARM='0010' 
> 

Your example abends regardless of the return code. if you want to abend
only if the RC is > 4, then put the abend step after the ELSE but before
the ENDIF. Also, a PROC step does not have a return code. Only EXEC PGM=
steps have return codes. So you cannot test the RC of STEP1. Assume that
the PROC1 has only one step, and it is STEPA, then the test would be:

//STEP1 EXEC PROC1
//TESTCC IF (STEP1.STEPA.RC <= 4) THEN
//STEP2 EXEC PROC2
// ELSE
//ABEND EXEC PGM=ABEND,PARM='0010'
// ENDIF

I cannot think of a to say: "If any step within PROC1 has a RC > 4,
then".

--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its'
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
 

----------------------------------------------------------------------
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

Reply via email to