printf() and scanf() and format validation

A decimal exception might be produced by the printf() family when processing an nonvalid decimal operand. This may result in abnormal termination of your program with the runtime message:
  • Under z/OS®:
    CEE3207S The system detected a Data exception.
  • Under CICS®:
    EDCK007 ABEND=8097 Data Exception

You must ensure that valid packed decimal data is present when attempting to use printf() or scanf() with runtime library decimal routines. No additional validation is performed on decimal to ensure format correctness. Use the decchk() routine to validate decimal data operands in such circumstances.