O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Associating User-Defined Formats with Variables

Referencing Your Formats

Remember that permanent, user-defined formats are stored in a format catalog. For example, the program below stores the format JOBFMT in a catalog named Library.Formats, which is located in the directory C:\Sas\Formats\Lib in the Windows environment.
libname library 'c:\sas\formats\lib'; 
proc format lib=library; 
   value jobfmt 
         103='manager' 
         105='text processor' 
         111='assoc. technical writer' 
         112='technical writer' 
         113='senior technical writer'; 
run;
To use the JOBFMT format in a subsequent SAS session, you must assign the libref Library again.
libname library 'c:\sas\formats\lib'; 
SAS searches for the format JOBFMT in two libraries, in this order:
  • the temporary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required