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.
|
proc print data=cert.therapy label; label walkjogrun='Walk/Jog/Run'; run;
walkjogrun
, even though you
specified a value for the variable.
proc print data=cert.admit label; /*#1*/ var age height; label age='Age of Patient'; /*#2*/ label height='Height in Inches'; /*#3*/ run;
1 | Use the LABEL option with the PROC PRINT statement. If you omit the LABEL option in the PROC PRINT statement, PROC PRINT uses the variable name. |
2 | You can assign labels in separate LABEL statements. In this example, label the variable Age as Age of Patients. |
3 | This is the second LABEL statement in this example. Label the variable Height as Height in Inches. |
proc print data=cert.admit label; /*#1*/ var actlevel height weight; label actlevel='Activity Level' /*#2*/ height='Height in Inches' weight='Weight in Pounds'; run;
1 | Use the LABEL option with the PROC PRINT statement. |
2 | A single LABEL statement assigns three labels to three different variables. Note that you do not need a semicolon at the end of your label until you are ready to close your LABEL statement. In this example, the semicolon is at the end of the label for Weight. |