IMS status code

IMS status AH: Required SSA missing

IMS status code AH means the call needed at least one SSA but none was passed. It's most often an ISRT call issued with only the function, PCB and I/O area.

Other names for this code

Also written as status code AH, IMS AH, DL/I status AH, AH status code, ISRT without SSA.

What it means

Some DL/I calls can run without SSAs. An unqualified GN, for example, just returns the next segment. ISRT is different. IMS has to know which segment type it is inserting, and it learns that from the SSAs. The last SSA on an ISRT names the segment being added, and any SSAs before it identify the parents. An ISRT with no SSA at all tells IMS nothing about where the data goes, so it returns AH.

AH is a programming error. IMS doesn't change the database or your position. The fix is in the call's parameter list, either the SSAs themselves or the count that tells IMS how many parameters there are.

Common causes

  • An ISRT was coded with only the function code, the PCB and the I/O area, without an SSA naming the segment type.
  • The program passes a parameter count as the first argument to CBLTDLI or another language interface, and the count is too low, so IMS never sees the SSAs.
  • A shared call routine builds the parameter list dynamically and drops the SSAs for some calls.
  • An assembler program ends the parameter list early by setting the high-order bit on the wrong address, so the SSAs after it are ignored.

How to find the problem

  1. Display the call's parameter list just before the call. Note the function code and count how many arguments follow it.
  2. If the program passes a parameter count, check that it includes the function, the PCB, the I/O area and every SSA.
  3. In an assembler program or a dump, follow the parameter address list and check which entry has the high-order bit set. That entry is the last one IMS reads.
  4. Check the code path that issues the ISRT. Look for a branch that calls with fewer arguments than the others.

How to fix it

  • Pass at least one SSA on every ISRT. The last SSA must be unqualified and name the segment type being inserted.
  • For a dependent segment, pass qualified SSAs for the parents first, or rely on current position and pass just the unqualified SSA for the new segment.
  • Correct the parameter count if the program supplies one.
  • In assembler, mark only the last real parameter as the end of the list.

IBM documentation

IBM documentation: status AH. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Can an ISRT ever work without an SSA?

Not a database ISRT. IMS needs at least the unqualified SSA that names the segment type being inserted. A message ISRT to the I/O PCB or an alternate PCB doesn't use SSAs.

Does AH mean the I/O area was wrong?

No. AH is about missing SSAs or a parameter list that is too short. Problems with the data in the I/O area give other status codes.

Which SSA should the ISRT have?

The last one must name the segment type you're inserting, with no qualification. Parent SSAs before it can be qualified to choose where the new segment goes.