Assigning Descriptive Labels

Temporarily Assigning Labels to Variables

To enhance your PROC PRINT by labeling 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'
variable2='label2'
... ;
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: Using the LABEL Option in the PROC PRINT Statement

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

Get SAS Certification Prep Guide, 5th 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.