Multiple choice technology mainframe

What abend will be hit when a COBOL program is trying to move Alphabetic Data into Numeric fields?

  1. S0C1

  2. S0C4

  3. S0C7

  4. S0CB

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

S0C7 is a data exception abend that occurs when a program attempts to perform invalid numeric operations, such as moving alphabetic data into a numeric field or doing arithmetic on non-numeric data. S0C1 is an operation exception, S0C4 is a protection exception, and S0CB is a division exception.

AI explanation

Moving alphabetic (non-numeric) data into a numeric field and then performing arithmetic on it produces invalid packed-decimal data. When the CPU tries to interpret that garbage as a decimal number it raises a data exception, which surfaces in MVS/z-OS as an S0C7 abend. S0C4 is a protection exception (bad addressing), and S0C1 is an operation exception (bad opcode), so neither fits a bad-data scenario.