sysVar.returnCode
The system variable sysVar.returnCode contains an external return code, as set by your program and made available to the operating system. It is not possible to pass return codes from one EGL program to another. A non-zero return code does not cause EGL to run an onException block, for example.
The initial value of sysVar.returnCode is zero, and the value must be in the range of -2147483648 to 2147483647, inclusive.
sysVar.returnCode is meaningful only for a main text program (which runs outside of J2EE) or a main batch program (which runs either outside of J2EE or in a J2EE application client). The purpose of sysVar.returnCode in this context is to provide a code for the command file or exec that invokes the program. If the program ends with an error that is not under the program's control, the EGL run time ignores the setting of sysVar.returnCode and attempts to return the value 693.
You can use sysVar.returnCode in these ways:
- As the source or target in an assignment or move statement (also allowed in the "for count" of a move statement)
- As a variable in a logical expression
- As the argument in an exit or return statement
The characteristics of sysVar.returnCode are as follows:
- Primitive type
- BIN
- Data length
- 9
- Is value always restored after a converse?
- Yes