13.4 Formatting Errors

Formatting errors occur when one or more of the following conditions are met:

gifs/20000000.gif The format string contains characters that can't be processed.

gifs/20000000.gif The data value to be formatted is not a legal value for the given data type.

gifs/20000000.gif The result of formatting a data value contains more bytes than what is allowed for by the calling routine.

gifs/20000000.gif The result of converting a formatted string is too big (or small) to fit into the resulting data value.

gifs/20000000.gif The data value is of unknown / unsupported size.

gifs/20000000.gif An input string is not formatted properly to be converted to a data value.

gifs/20000000.gif An input string is formatted correctly, but the converted values are inconsistent. For example, a date string of Fri, 2 Aug 1986 is inconsistent (August 2, 1986 is a Saturday).

gifs/20000000.gif A input string is formatted correctly, but the converted values are illegal (i.e., Feb 30, 1986).

What happens when a format error occurs depends on what is using the formatting routines. When entering data, an error message is displayed, and the user must retype the input string. When displaying data, an empty string (or blanks) is displayed. When using utilities to convert values (i.e., put or dcopy), the data is silently lost. The actual times when data is really lost using the utilities should be extremely rare.