To label the columns in your report with more descriptive text, you use the LABEL statement to assign a descriptive label to a variable. |
General form, LABEL statement:
LABEL variable1='label' variable2='label'; Labels can be up to 256 characters long and must be enclosed in quotes.
|
In the PROC PRINT step below, the variable
WalkJogRun is displayed with the label
Walk/Jog/Run. Note the LABEL option in the PROC PRINT statement.
proc print data=clinic.therapy label; label walkjogrun='Walk/Jog/Run'; run; |
Obs | Month | AerClass | Walk/Jog/Run | Swim |
1 | JAN1999 | 56 | 78 | 14 |
2 | FEB1999 | 32 | 109 | 19 |
3 | MAR1999 | 35 | 106 | 22 |
4 | APR1999 | 47 | 115 | 24 |
5 | MAY1999 | 55 | 121 | 31 |
6 | JUN1999 | 61 | 114 | 67 |
7 | JUL1999 | 67 | 102 | 72 |
8 | AUG1999 | 64 | 76 | 77 |
9 | SEP1999 | 78 | 77 | 54 |
10 | OCT1999 | 81 | 62 | 47 |
11 | NOV1999 | 84 | 31 | 52 |
12 | DEC1999 | 2 | 44 | 55 |
13 | JAN2000 | 37 | 91 | 83 |
14 | FEB2000 | 41 | 102 | 27 |
15 | MAR2000 | 52 | 98 | 19 |
16 | APR2000 | 61 | 118 | 22 |
17 | MAY2000 | 49 | 88 | 29 |
18 | JUN2000 | 24 | 101 | 54 |
19 | JUL2000 | 45 | 91 | 69 |
20 | AUG2000 | 63 | 65 | 53 |
21 | SEP2000 | 60 | 49 | 68 |
22 | OCT2000 | 78 | 70 | 41 |
23 | NOV2000 | 82 | 44 | 58 |
24 | DEC2000 | 93 | 57 | 47 |
Using Single or Multiple LABEL Statements
You can assign labels in separate LABEL statements . . . proc print data=clinic.admit label; var age height; label age='Age of Patient'; label height='Height in Inches'; run; . . . or assign any number of labels in a single LABEL statement. proc print data=clinic.admit label; var actlevel height weight; label actlevel='Activity Level' height='Height in Inches' weight='Weight in Pounds'; run; |
Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.