The termination action taken by a program is of special importance when it is invoked within a procedure or is monitored by a job variable.
If error messages to which an internal return code is assigned (see error message COB9119 in chapter "Messages of the COBOL2000 system") are issued during program execution, this return code is passed to the last two bytes of the return code indicator of a monitoring job variable (see “Job Variables” manual [7]).
The following table provides an overview of
the possible contents of the return code indicator in job variables,
the associated error messages, and
their impact on the further progress of a procedure.
Return code | Error | Short description of the error | Continuation | Dump | Triggers |
0100 | none | No error detected by the runtime system | -- | no | no |
1120 | COB9120 | Job variables not available | yes | yes | |
1121 | COB9121 | End of file during ACCEPT processing | yes | ||
1123 | COB9123 | Invalid argument in a standard function | yes | ||
1128 | COB9128 | User return code is set | no | ||
1131 | COB9131 | Job variables: | yes | ||
1132 | COB9132 | Wrong number of parameters (CALL) | yes | ||
1133 | COB9133 | Program execution in BS2000 Version< 10.0 | no | ||
1134 | COB9134 | Sort error | yes | ||
2140 | COB9140 | Reference modification error | yes | no / yes4) | |
2141 | COB9141 | Last XML statement not yet processed | no | ||
2142 | COB9142 | GO TO has no ALTER | no | ||
2143 | COB9143 | Purge date for the volume has not yet expired | no | ||
2144 | COB9144 | Table: | yes | ||
2145 | COB9145 | Table | yes | ||
2146 | COB9146 | COBOL2000 runtime system in CRTE is incompatible with the object program | no | ||
2148 | COB9148 | CALL or ADDRESS OF PROGRAM not executable | no | ||
2149 | COB9149 | Incompatible data in numeric edited item | no | ||
2151 | COB9151 | Files: | no | ||
2152 | COB9152 | Connection to the database could not be established | no | ||
2153 | COB9153 | Error while converting EBCDIC to UTF-16 | yes | ||
2154 | COB9154 | REPORT WRITER: | no | ||
2155 | COB9155 | Error on exit from a USE procedure | no | ||
2156 | COB9156 | DML: SUB-SCHEMA module too small for processing an extensive DML statement | no | ||
2157 | COB9157 | CALL not executable | no | ||
2158 | COB9158 | More than 9 recursive calls to DEPENDING paragraphs | no | ||
2159 | COB9159 | Error while quitting an XML PROCESSING procedure | no | ||
2160 | COB9160 | Runtime unit uses CANCEL, but contains programs compiled with a COBOL85 compiler < V2.0 | no | ||
2162 | COB9162 | The attributes of an external file are not consistent within the programs of a runtime unit | no | ||
2163 | COB9163 | The storage space for DYNAMIC data could not be set up | no | ||
2164 | COB9164 | Program called with CALL is not available | no | ||
2165 | COB9165 | Invalid call or | no | ||
2168 | COB9168 | REPORT WRITER: | no | ||
2173 | COB9173 | SORT run not successful | no | ||
2174 | COB9174 | Error handling in the program: | no no | ||
2176 | COB9176 | REPORT WRITER: | no | ||
2178 | COB9178 | Record to be sorted does not match SD description | no | ||
2179 | COB9179 | Sorted record does not match GIVING file description | no | ||
2180 | COB9180 | RELEASE/RETURN not under the control of SORT/MERGE | no | ||
2181 | COB9181 | DATABASE-HANDLER has not yet finished processing the last DML statement | no | ||
2182 | COB9182 | Invalid inheritance of classes or interfaces | no | ||
2184 | COB9184 | SORT within the SORT controller | no | ||
2185 | COB9185 | Error in connection with OO language elements | no | ||
2188 | COB9188 | XML parser not found | no | ||
2189 | COB9189 | PARTIAL-BIND runtime system not found | no | ||
3191 | COB9191 | SUPER class not found | no | yes | |
3192 | COB9192 | The end of the program was reached but neither STOP RUN nor EXIT PROGRAM was executed | no | ||
3193 | COB9193 | DISPLAY error | no | ||
3194 | COB9194 | Error during input from SYSDATA | no | ||
3195 | COB9195 | Error during output to SYSLST | no | ||
3196 | COB9196 | ACCEPT or DISPLAY statement error at the runtime system/operating system interface | no | ||
3197 | COB9197 | Job variables: | yes | ||
3198 | COB9198 | Hardware interrupt | no | ||
3199 | none | WROUT error: | no |
Table 10: Return code indicators in job variables
1) | The first digit indicates the weight of the message (0: note, 1: warning, 2: error, 3: fatal error). |
2) | For content and meaning of messages see chapter "Messages of the COBOL2000 system". |
3) | Program abortion can be induced with RUNTIME-OPTIONS=PAR(ERROR-REACTION = TERMINATION) or COMOPT CONTINUE-AFTER-MESSAGE=NO. After the program has been aborted, the associated return code is set in the job variable monitoring the program. |
4) | Batch processing: no |
5) | When a spin-off is triggered, all subsequent commands are ignored with the exception of the SET-JOB-STEP, EXIT-JOB, LOGOFF, CANCEL-PROCEDURE, END-PROCEDURE and EXIT-PROCEDURE commands. The SET-JOB-STEP command terminates the spin-off, and processing is continued with the next command. |