How the NOFMTERR option handles formatting of numeric and character data


The FMTERR|NOFMTERR system option determines whether an error message is generated when a variable's format cannot be found. Specifying NOFMTERR causes missing formats to be replaced with the w. or $w. format. Note that a numeric format can be replaced with the w. format, not the w.d format.

If a numeric user-written format is associated with a variable and no decimal width is specified when the format is assigned, NOFMTERR uses the w. format. If a decimal width is specified when the format is assigned, NOFMTERR uses the w.d format.

For example, if a user-written format ABC is associated with a variable using the following FORMAT statement, NOFMTERR uses 6.2 as the format:

format var abc6.2; 

If the format is associated with the variable using the following FORMAT statement, NOFMTERR uses 6. as the format, and the decimal portion of the value is rounded:

format var abc.;