What it means
Code 0CB is the program check for a decimal divide exception. A decimal divide instruction could not give a result, either because the divisor was zero or because the quotient would not fit in the instruction's work area.
The numbers were valid (otherwise you would get 0C7 first); the division itself was impossible. Zero is a valid packed number, so the divisor passes an IS NUMERIC test.
Typical causes
- The divisor was zero for this record.
- A divisor field initialised to zero but never set, because of a missing READ or branch.
- A wrong field layout, so the program used a different field as the divisor.
- Rarely, a quotient too large for the intermediate work area.
How to fix it
- Map the offset to the DIVIDE or COMPUTE in the listing.
- Check the divisor's value for the failing record.
- Guard the divide with a zero test and handle the case the business way.
- Add ON SIZE ERROR to divisions that use external data.
- Include zero-divisor records in test data.
Example
Illustrative only; names and values are invented.
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=0CB REASON CODE=0000000B
IEF450I RATEJOB1 STEP020 - ABEND=S0CB U0000 REASON=0000000B