openUTM returns the following return codes in the return area of the communication area after KDCS calls: in the KCRCCC field, after each call a KDCS return code in accordance with DIN 66 265 (compatible return code) and possibly a UTM-specific return code in the KCRCDC field (KCRCDC). These return codes inform you whether openUTM was able to execute the KDCS call or why openUTM could not execute it.
For each KDCS call there is a description of the error codes that may occur with that call. For a list of error codes refer to the openUTM manual ”Messages, Debugging and Diagnostics”.
If control is returned to the program unit after a call, it therefore has to check:
whether the call was executed without errors; this is the case if the program unit recognizes that the KDCS return code has the value "000" (in the KCRCCC field).
which errors have occurred on the basis of the specified error code.
Additional information that may be relevant for the measures which are to be implemented include the actual transferred length (KCRLM field) and the employed format character (KCRMF/kcrfn field) etc.
In the event of serious errors, the program unit does not get control back. In such cases, openUTM rolls back the transaction, terminates the service and creates a PEND ER dump; the error code that led to the abortion of the service can be obtained from the UTM Diagarea of the PEND ER dump. You will find more information on the analysis of a PEND ER dump in the openUTM manual ”Messages, Debugging and Diagnostics”.
On Unix and Linux systems, you have the option of keeping control in certain cases by performing a user-specific error handling, see "User-specific error handling (Unix and Linux systems)".
The program unit can use RSET, PGWT RB or PEND RS/ER/FR to roll back the transaction: a PEND ER causes a dump to be requested.
It might also happen that openUTM returns an error message because it has received an error message from one of the components involved (e.g. the formatting system).
In the case of such errors openUTM executes an internal error handling routine, thus relieving the program unit of this task. Where possible, openUTM corrects the error, otherwise the service is aborted by PEND ER and the appropriate UTM error code is set.
For examples of error routines, refer to the sample programs, for C/C++ "Programming examples in C/C++", for COBOL
"Programming examples in COBOL".