Associating User-Defined Formats with Variables
How SAS Finds Format Catalogs
To use the GENDER, AGEGROUP, and $COL formats in a subsequent SAS session, you must assign the libref Formtlib again.
libname formtlib 'C:\Users\Student1\formats\lib';
SAS searches for the formats GENDER, AGEGROUP, and $COL in two libraries, in this order:
the temporary library referenced by the libref Work
a permanent library referenced by the libref Formtlib
SAS uses the first instance of a specified format that it finds.
TipYou can delete formats using PROC CATALOG.
Assigning Formats to Variables
Just as with SAS formats, you associate a user-defined format with a variable in a FORMAT statement.
data work.carsurvey; set cert.cars; format ...