Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

U4038

Unhandled condition, run unit endedLANGUAGE ENVIRONMENT USER ABEND · CHECKED 2026-11-14
Checked against IBM documentation

Language Environment ended the enclave with user abend 4038 because a software-raised condition of severity 2 or higher went unhandled while ABTERMENC(ABEND) was in effect.

QUICK ANSWER

Language Environment ended the enclave with user abend 4038 because a software-raised condition of severity 2 or higher went unhandled while ABTERMENC(ABEND) was in effect.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. A software-raised condition of severity 2 or greater was not handled.
  2. ABTERMENC(ABEND) was specified as the runtime option.
  3. The assembler user exit did not alter the CEEAUE_ABND flag setting.

CHECKED 14 Nov 2026 IBM: Abend codes generated by ABTERMENC(ABEND) runtime option | z/OS 3.2.0 | IBM Documentation (Language Environment)

MOST LIKELY

A software-raised condition of severity 2 or greater was not handled.

FIRST CHECK

Check whether ABTERMENC(ABEND) is in effect, since 4038 is generated only for that setting.

TRY IT ▸

Site search

What it means

With the ABTERMENC(ABEND) runtime option, Language Environment ends the enclave with an abend when an unhandled condition of severity 2 or greater occurs. For a software-raised condition, the abend is a user 4038 in a non-CICS environment (transaction abend 4038 in CICS) with reason code 1 in non-CICS.

Other kinds of unhandled condition use different codes: an original abend keeps its own code, and a program interrupt uses its own abend and reason codes.

Typical causes

  • A software-raised condition of severity 2 or greater was not handled.
  • ABTERMENC(ABEND) was specified as the runtime option.
  • The assembler user exit did not alter the CEEAUE_ABND flag setting.

How to fix it

  1. Check whether ABTERMENC(ABEND) is in effect, since 4038 is generated only for that setting.
  2. Find which software-raised condition of severity 2 or greater was left unhandled and handle it in the program.
  3. In CICS, remember that only the abend code is returned and no reason code is available.