Assigning Descriptive Labels

Temporarily Assigning Labels to Variables

You can also enhance your PROC PRINT report by labeling columns with more descriptive text. To label columns:
  • Use the LABEL statement to assign a descriptive label to a variable.
  • Use the LABEL option in the PROC PRINT statement to specify that the labels be displayed.
Syntax, LABEL statement:
LABEL variable1='label1'
... ;
Labels can be up to 256 characters long. Enclose the label in quotation marks.
Tip:The LABEL statement applies only to the PROC step in which it appears.

Example: The LABEL Option

In the PROC PRINT step below, the variable name WalkJogRun is displayed with the label Walk/Jog/Run. Note the LABEL ...

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.