Command return codes which a BS2000 command may pass upon execution are part of the respective command descriptions. The table below contains general command return codes that are automatically passed by SDF if
SDF senses an error prior to command execution (e.g. syntax error)
the command cannot be executed
the command, i.e. the execution module itself, does not pass a command return code. In this case, the command description does not contain any specific command return codes.
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | No errors | |
0 | CMD0002 | Command executed with warning 4) | |
1 | 0 | CMD0026 | Command no longer supported |
2 | 0 | CMD0093 | Procedure ended in test mode 1) |
2 | 0 | CMD0201 | End of file reached 1) |
2 | 0 | CMD0214 | End of program 3) |
1 | CMD0211 | SDF transfer area too small | |
1 | CMD0202 | Syntax error 5) 6) | |
1 | CMD0205 | SPIN-OFF 1) 2) | |
1 | CMD2201 | Internal parameter error | |
2 | CMD0200 | Command presently not available | |
2 | CMD2202 | Subsystem not defined | |
3 | CMD2203 | Installation error | |
32 | CMD0221 | Internal SDF error | |
32 | CMD2009 | Error during output to variables | |
32 | IMO9101 | Internal error in IMON-GPN | |
64 | CMD0216 | Requisite privilege missing | |
64 | IMO9100 | Installation unit, version or logical name not found, etc.; the cause can be found in the SYSOUT message | |
65 | CMD2241 | Subsystem not loaded | |
66 | CMD2242 | Subsystem not connected | |
128 | CMD2280 | Subsystem not available for a short period | |
129 | CMD2281 | Subsystem not available for a long period | |
130 | CMD2282 | Subsystem not available for an indefinite period | |
130 | NBR0748 | After /SHUTDOWN, the only command that can be entered at the console is /SHOW-PENDING-MSG |
1) | Command return codes CMD0093, CMD0201 and CMD0205 are not possible if the command is issued via the CMD macro. |
2) | Command return code CMD0205 is passed if spin-off was initiated. Example: end of program with TERM macro call with UNIT=STEP, and no command return code has been set with the CMDRC macro call during the program run. |
3) | Command return code CMD0214 cannot be passed to the calling program by the CMD macro because the program has been terminated by CMD macro execution. |
4) | Command return code CMD0002 is passed by SDF if a command triggers spin-off despite error-free execution. This compatibly supports the previous spin-off behavior of commands (and thus error handling in non-S and ENTER procedures). In S procedures in which ERROR-MECHANISM=*BY-RETURNCODE applies (see the SET-/MODIFY-PROCEDURE-OPTIONS command), error recovery is not initiated automatically since the related subcode 1 has the value zero. |
5) | Command return code CMD0202 is passed by SDF if a command does not initiate spin-off on incorrect execution. CMD0202 indicates syntactical and semantic errors detected during command execution. This compatibly supports the previous spinoff behavior of commands (and thus error handling in non-S and ENTER procedures). In S procedures in which ERROR-MECHANISM=*BY-RETURNCODE applies (see the SET-/MODIFY-PROCEDURE-OPTIONS command), error recovery is initiated since the related subcode 1 has a value other than zero. |
6) | Command return code CMD0202 is passed by SDF from the execution module for both syntactical and semantically errors. |
Notes
In user programs the CMDRC macro call can be used to set a command return code. This return code is retained up to the next CMDRC macro call. On program termination the current command return code from the program is passed to the caller and triggers error recovery in S procedures for subcode 1 with a value other than zero if ERROR-MECHANISM=*BY-RETURNCODE was specified (see the SET-/MODIFY-PROCEDURE-OPTIONS command).
Return codes set within the program can be evaluated like command return codes after each statement (see the BEGIN-BLOCK command in section "Builtin functions").