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 Library again.
libname library 'c:\sas\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 Library
SAS uses the first instance
of a specified format that it finds.
Tip
You 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 carsurvey; infile 'Z:\sasuser\cars.dat'; input Age ...
Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.