To store formats in a permanent format catalog named
Library.Formats:
-
Specify a LIBNAME statement that
associates the libref with the permanent SAS library in which the
format catalog is to be stored.
libname library 'c:sasformatslib';
-
Specify the LIBRARY= option in
the PROC FORMAT statement and specify the libref Library.
PROC FORMAT LIBRARY=library;
Note: If you omit the LIBRARY=option,
then formats and informats are stored in the Work.Formats catalog.
The LIBRARY= option
accepts a libref and a catalog in the format library.format.
When the LIBRARY= option specifies a libref and not a catalog, PROC
FORMAT uses the catalog Formats.
When you associate a
permanent format with a variable in a subsequent DATA or PROC step,
use the Library libref to reference the location of the format catalog.
Any format that you
create in this PROC FORMAT step is now stored in a permanent format
catalog called Library.Formats.
libname library 'c:sasformatslib';
proc format library=library;
...more SAS statements...
run;
In the program above,
the catalog Library.Formats is located in the SAS library c:sasformatslib
, which is referenced by the libref Library.
Notice that LIB= is
an acceptable abbreviation for the LIBRARY= option.
proc format lib=library;