In a message dated 9/19/2005 10:52:45 P.M. Central Standard Time, [EMAIL PROTECTED] writes:
What's a good and very reliable way to write a step which sets its return code to a particular non-zero value? (2 is ideal since it's not even warning severity.) >> REXX sample: 1.4.3.1 EXIT Instruction The EXIT instruction causes an exec to unconditionally end and return to where the exec was invoked. If the exec was initiated from the PROC section of an ISPF selection panel, EXIT returns to the ISPF panel. If the exec was called by a program, such as another exec, EXIT returns to the program. More about calling external routines appears later in this chapter and in _Chapter 6, "Writing Subroutines and Functions" in_ (http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj4c310/1.6?SHELF=IKJ4BK31&DT=20010706113306#HDR SUBROU) _topic 1.6_ (http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj4c310/1.6?SHELF=IKJ4BK31&DT=20010706113306#HDRSUBROU) . In addition to ending an exec, EXIT can also return a value to the invoker of the exec. If the exec was invoked as a subroutine from another REXX exec, the value is received in the REXX special variable RESULT. If the exec was invoked as a function, the value is received in the original expression at the point where the function was invoked. Otherwise, the value is received in the REXX special variable RC. The value can represent a return code and can be in the form of a constant or an expression that is computed. ___ Example Using the EXIT Instruction _________________________________ | | | | | /******************************** REXX *****************************/| | /* This exec uses the EXIT instruction to end the exec and return */| | /* a value that indicates whether or not a job applicant gets the */| | /* job. A value of 0 means the applicant does not qualify for */| | /* the job, but a value of 1 means the applicant gets the job. */| | /* The value is placed in the REXX special variable RESULT. */| | /*******************************************************************/| | SAY 'How many months of experience do you have? Please enter' | | SAY 'the months as a number.' | | PULL month | | | | SAY 'Can you supply 3 references? Please answer Y or N.' | | PULL reference | | | | SAY 'Are you available to start work tomorrow? Please answer Y or N.| | PULL tomorrow | | | | IF (month > 24) & (reference = 'Y') & (tomorrow = 'Y') THEN | | job = 1 /* person gets the job */| | ELSE | | job = 0 /* person does not get the job */| | | | EXIT job | | | |________________________________________________________________________| ---------------------------------------------------------------------- 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

