Save current command return code
| Component: | SDF-P-BASYS | 
| Functional area: | Procedures | 
| Domain: | PROCEDURE | 
| Privileges: | STD-PROCESSING | 
Function
The SAVE-RETURNCODE command can only be used within S procedures and in dialog blocks.
The SAVE-RETURNCODE command allows the user saves the current command return code in a nonerror situation. The SAVE-RETURNCODE command must directly follow the command concerned. This code can subsequently be queried using the builtin functions SUBCODE1, SUBCODE2 and MAINCODE (see section "SDF-P-BASYS" and “SDF-P” [34]).
Note
When the chargeable SDF-P subsystem is used, the current command return code for a command is implicitly saved by an immediately following IF-CMD-ERROR command. The command return code can then be evaluated in the ELSE branch in a nonerror situation (see the “SDF-P” manual [34]).
Format
| SAVE-RETURNCODE | 
Return codes
| (SC2) | SC1 | Maincode | Meaning | 
|---|---|---|---|
| 0 | CMD0001 | No error | |
| 1 | CMD0202 | Syntax error | |
| 3 | CMD2203 | Incorrect syntax file | |
| 32 | CMD0221 | System error (internal error) | |
| 130 | SDP0099 | No further address space available |