Assigning Permanent Labels and Formats

Common Tasks and Their Corresponding Statements

You saw how to temporarily assign labels and formats within a PROC step in Creating List Reports. These temporary labels and formats are applicable only for the duration of the step. To permanently assign labels and formats, you use LABEL and FORMAT statements in DATA steps.
Note: Labels and formats do not affect how data is stored in the data set, but only how it appears in output.
Task
Statement to Use
Reference a SAS data library
Reference an external file
libname clinic 'c:\users\may\data'; 
filename tests 'c:\users\tmill.dat';
Name a SAS data set
Identify an external file
Describe raw data
data clinic.stress; infile tests obs=10; ...

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.