After every call to HRNHLLTM you should check the return code to ensure that the operation was successful. The Call Level Interface return code is set in the eighth parameter to HRNHLLTM (HRN-RETURN-CODE in the COBOL examples, CODE in the assembler examples). Possible values of return codes and reason codes and their meanings are listed in
Call Level Interface Return Codes and in
Call Level Interface Reason Codes.
Alternatively, you can use the MESSAGE_LOG tool to capture a message log and place it in a TDS table for later viewing. This is an appropriate technique during application development and debugging. You can also capture relevant parts of the message log and place it in a commarea to pass back to the COBOL program. This requires the ability to predict the error and handle it in your client program, but it is appropriate for error handling in a production system.