MainframeKit

S0C7

Data exceptionSYSTEM ABEND

A decimal instruction hit a field that is not a valid packed or zoned number. The code is usually fine; the data is not.

MOST LIKELY

A numeric field was never initialised and holds spaces or low-values.

FIRST CHECK

Map the offset in the symptom dump to the statement in the compile listing.

TRY IT ▸

Record decoder

What it means

Code 0C7 is the program check for a data exception. In business programs it means a decimal instruction (add, subtract, multiply, divide, compare or convert) found bytes that are not a valid decimal number, so the processor refused to continue.

A valid packed field has digits 0-9 in every half-byte except the last, which holds the sign. Spaces (X'40') and low-values (X'00') are not valid numbers. The failure is data-dependent: the same record fails every time.

Valid vs invalid bytes

VALID · PIC S9(5) COMP-3

01
23
4C

Digits, then sign C: +1234.

INVALID · SAME FIELD HOLDING SPACES

40
40
40

The first five half-bytes are valid digits, but the last one, 0, is not a sign (A–F), so the field is not valid packed decimal.

Typical causes

  • A numeric field was never initialised and holds spaces or low-values.
  • An alphanumeric or group item was moved into a numeric field.
  • The input record layout differs from the copybook the program uses.
  • A file transfer damaged packed fields or changed their encoding.
  • A REDEFINES treats character data as numeric.

How to fix it

  1. Map the offset in the symptom dump to the statement in the compile listing.
  2. List every numeric field that statement uses.
  3. Find the record being processed and browse it in hex to see the bad bytes.
  4. Trace where the field was last set: a READ, MOVE or initialisation.
  5. Fix the data or add validation (IF field IS NUMERIC) before arithmetic.
  6. Check that outputs from the failed run are cleaned up before you rerun.

Example

Illustrative only; names and values are invented.

IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=0C7  REASON CODE=00000007
IEF450I PAYJOB01 STEP020 - ABEND=S0C7 U0000 REASON=00000007