Return Code Processing When REXX Execs Are Queued
The platform server bases the request return code on two values returned by the REXX command processor.
A return code indicates whether the exec is processed without errors. Sample errors could be syntax errors that are not intercepted by the SIGNAL, or execs that are not defined in the SYSEXEC file. To determine the return code, consider the following two situations:
- If the platform server receives a non-zero return code from the REXX command processor, that is the return code that the platform server saves.
- If the platform server receives a zero return code from the REXX command processor, it scans the data returned by the REXX processor on the EXEC or RETURN statement. Up to 64 bytes of data can be returned and displayed on the REXX exec completion message. The platform server checks the first 5 bytes of that message for a return code. The 5 bytes are evaluated in the following manners:
- If the 5 bytes of data are numeric, the platform server converts that data to a return code value.
- If the platform server finds one or more numeric characters followed by a space or a null (0x00), the platform server converts that data into a return code.
- If no numeric data is found (followed by a null or space), the platform server assigns a return code value of 0.
Note: The platform server assigns a 1 byte value to contain the return code. Therefore, any return code value greater than or equal to 256 is computed by dividing 256 into the return code and assigning the remainder as the return code. Therefore, a return code of 256 becomes a 0 return code, while a return code of 257 becomes a return code of 1.
Copyright © Cloud Software Group, Inc. All rights reserved.