Common errors in routines

These common errors have simple solutions:

If your error is not caused by any of the items listed above, examine your routine or routines for changes since the last successful run. If there have been changes, review these changes for errors that might be causing the problem. One way to isolate the problem is to branch around or comment out recent changes and rerun the routine. If the run is successful, the error can be narrowed to the scope of the changes.

Changes in optimization levels, addressing modes, and input/output file formats can also cause unanticipated problems in your routine.

In most cases, generated condition tokens or runtime messages point to the nature of the error. The runtime messages offer the most efficient corrective action. To help you analyze errors and determine the most useful method to fix the problem, Table 1 lists common error symptoms, possible causes, and programmer responses.

Table 1. Common error symptoms, possible causes, and programmer responses
Error Symptom Possible Cause Programmer Response
Numbered runtime message appears Condition raised in routine For any messages you receive, read the Programmer Response. For information about message structure, see Interpreting runtime messages below.
User abend code < 4000
  • A non-Language Environment abend occurred
  • The assembler user exit requested an abend for an unhandled condition of severity ≥2
See the Language Environment abend codes in z/OS Language Environment Runtime Messages. Check for a subsystem-generated abend or a user-specified abend.
User abend code ≥ 4000
  • Language Environment detected an error and could not proceed
  • An unhandled software-raised condition occurred
  • The assembler user exit requested an abend for an unhandled condition of severity 4
For any abends you receive, read the appropriate explanation listed in the abend codes section of z/OS Language Environment Runtime Messages.
System abend with TRAP(OFF) Cause depends on type of malfunction

Respond appropriately. See the messages and codes information of the operating system.

System abend with TRAP(ON) System-detected error

See the messages and codes information of the operating system.

No response (wait/loop) Application logic failure Check routine logic.
Unexpected message (message received was not from most recent service) Condition caused by something related to current service Generate a traceback using cdump() or ctrace().
Incorrect output Incorrect file definitions, storage overlay, incorrect routine mask setting, references to uninitialized variables, data input errors, or application routine logic error Correct the appropriate parameters.
No output Incorrect ddname or file definitions Correct the appropriate parameters.
Nonzero return code from enclave The return code was issued by the application routine Check the application for the meaning of the return code.