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:

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.