What it means
Code 0C7 is the program check for a data exception: a decimal instruction was applied to bytes the hardware cannot treat as a valid number. Language Environment reports it as CEE3207S.
The program is terminated unless a condition handler takes over.
Valid vs invalid bytes
VALID · PIC S9(5) COMP-3
Digits, then sign C: +1234.
INVALID · SAME FIELD HOLDING SPACES
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 variable used by the failing statement was never initialised correctly.
- Packed or zoned data carries a sign other than the preferred one while the program was compiled with NUMPROC(PFD).
- REDEFINES or group moves changed numeric data so that it no longer follows the standard sign formats.
- A zoned or packed sending field, or an alphanumeric field moved to a numeric receiver, holds contents that are not valid numeric digits.
How to fix it
- Check that every variable in the failing statement was initialised correctly.
- Compile with the NUMCHECK option so an implicit numeric test flags the first invalid sending field with a message or abend.
- Use NUMPROC(NOPFD) when data may contain nonpreferred signs.
- With NUMPROC(PFD), initialise fields with INITIALIZE instead of group moves.
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