EDT supplies a command return code that can be used by SDF-P for the control of S procedures. The command return code makes it possible to react specifically to certain error situations.
The command return code consists of three parts:
the main code which corresponds to a message code by means of which more detailed information can be queried using the command
HELP-MSG-INFORMATION
subcode1 (
SC1
) which assigns the error situation that has occurred to an error class which makes it possible to estimate the severity of the errorsubcode2 (
SC2
) which may contain additional information (value other than null)
SC2 | SC1 | Main code | Meaning |
0 | 0 | EDT8000 | Normal termination of the EDT session. No messages |
2 | 0 | EDT8000 | Normal termination of the EDT session. Only messages |
5 | 0 | EDT8000 | Normal termination of the EDT session. At least one |
10 | 0 | EDT8000 | Normal termination of the EDT session. At least one |
50 | 64 | EDT8101 | Abnormal termination by the user |
100 | 64 | EDT8200 | Abort due to time overrun (program runtime exceeded) |
100 | 64 | EDT8292 | Read error. Program aborted. |
100 | 64 | EDT8293 | Write error. Program aborted. |
150 | 64 | EDT8910 | Program interruption. |
150 | 64 | EDT8001 | Abnormal termination after program interruption |
200 | 64 | EDT8002 | Error in dynamic loading of EDT mode. |
200 | 64 | EDT8003 | Insufficient virtual memory available |
200 | 64 | EDT8005 | EDT initialization error |
200 | 64 | EDT8006 | Installation error |
For information on the messages and message levels, see section “Message texts”.
If EDT is terminated abnormally, it is possible to query the components of the return code using the SDF-P functions SUBCODE1()
, SUBCODE2()
and MAINCODE()
.
If EDT is terminated normally, the /SAVE-RETURNCODE
command can be used to save the return code for evaluation (for more detailed information on command return codes and for querying return codes, see the SDF-P User Guide [7]).
Example for the querying of return codes
/MODIFY-JOB-SWITCHES ON=5 /START-EDT @LOG NONE @... @DIALOG @... @HALT /SAVE-RETURNCODE /IF-BLOCK-ERROR / WRITE-TEXT 'ERROR: &SUBCODE1, &SUBCODE2, &MAINCODE' /ELSE / WRITE-TEXT 'EDT TERMINATED NORMALLY' / IF (&SUBCODE2 > 5) / WRITE-TEXT 'A SYNTAX ERROR HAS OCCURRED' / RAISE-ERROR MAINCODE=EDT3002 / END-IF / ... /END-IF /HELP-MSG-INFORMATION &MAINCODE /MODIFY-JOB-SWITCHES OFF=5