In addition to the formats
that are supplied with Base SAS software, you can create your own
formats. In Base SAS software, PROC FORMAT enables you to create your
own formats for both character and numeric variables.
When you execute a SAS
program that uses user-defined formats, these formats should be available.
The two ways to make these formats available are
-
to create permanent, not temporary,
formats with PROC FORMAT
-
to store the source code that creates
the formats (the PROC FORMAT step) with the SAS program that uses
them.
To create permanent
SAS formats, see FORMAT Procedure in Base SAS Procedures Guide.
If you execute a program
that cannot locate a user-defined format, the result depends on the
setting of the FMTERR system option. If the user-defined format is
not found, then these system options produce these results:
|
|
|
SAS produces an error
that causes the current DATA or PROC step to stop.
|
|
SAS continues processing
and substitutes a default format, usually the BEST w.
or $ w. format.
|
Although using NOFMTERR
enables SAS to process a variable, you lose the information that the
user-defined format supplies.
To avoid problems, make
sure that your program has access to all user-defined formats that
are used.