Mainframe Path Start learning free
CoreError and abend codesGE

IMS status code GE — segment not found

DL/I could not find a segment that matches the call. It is a normal outcome for many programs, and a bug only when the program did not expect it.

What happened

An IMS program issued a DL/I call such as GU, GN, GNP or ISRT. IMS did not abend. It put GE in the status code field of the DB PCB and returned control. If the program does not test that field, it may carry on with stale data in its I/O area, or stop with its own error message.

Program trace written by the application (illustrative)Illustrative example
MPCUST01 CALL=GU  SEG=CUSTROOT SSA=(CUSTNO  =C0001234) STATUS=GE
MPCUST01 CALL=GN  SEG=ORDER    SSA=(ORDDATE >=20260101) STATUS=GE
MPCUST01 CUSTOMER C0001234 NOT ON FILE - RECORD SKIPPED

What it means

GE tells you that IMS searched and found no segment that satisfies the segment search arguments (SSAs) you supplied. What that means in practice depends on the call:

Do not confuse GE with GB. GB means a GN reached the end of the database (or the end of a DEDB range set with SETR). IBM documents that an unqualified GN, or a qualified GN without a maximum key that returns no data, gives GB rather than GE. A qualified GN with an upper-bound key can return GE even when the segment exists further on, because IMS meets a higher key first.

Typical causes

Symptoms

Where to look

How to diagnose

  1. Record the call function, the SSA text exactly as passed (in hex if needed) and the status code.
  2. Check the key field length and format against the DBD field definition.
  3. Confirm the key really exists, using a query tool or a test GU with the same key.
  4. For GN/GNP, trace the earlier calls: where was position established, and did any of them fail?
  5. For ISRT, read the segment level number in the PCB to see which parent level is missing.

How to fix

If the 'not found' is a legitimate business case, handle it explicitly: test for GE after each call and take the documented path (skip, report, or insert). If it is a bug, correct the SSA (field name, operator, key layout) or the call order, so that parents are inserted before children and position is re-established with a GU before a GN loop.

How to prevent

Production considerations

Interview question

What is the difference between status codes GE and GB?

Stuck on something else?
Ask the community or search the full course.

Ask a question