Mark Jacobs wrote:
>While there's no hard and fast rule, i.e. nothing prevents you from generating
>any return code from your programs, it's a tradition that return codes are a
>multiple of 4.
>0 - Normal
>4- Warning
>8 - Error
>12 - Severe Error
>16 - Terminal Error
IT version of Richter Scale? ;-)
I see RC=0 also as Informational and RC=16 as Unrecoverable Error
Could there be another reason? One reason I could think of is the usage of
masking values (bitwise comparision) and ease of branching based on the RC.
Something like this quick example (without masking) which may be suitable in
some situation:
* PROCESS RETURN CODE
B *+4(R15)
B SPECIAL RC = 0 AUTH
B NOPROF RC = 4 AUTH
B FAIL RC = 8 AUTH
Of course, you should check for non-standard RC too, perhaps by Compare and
Branch on Equal.
Another possible reason is - same return codes standards are also used for
macros (system services) and system exits. So one set of convention is used to
pass info including RC from one module to another.
I think some greybeards will chime in... ;-)
Groete / Greeting
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN