Basics:
Making a data set easy to understand, and producing
pretty results
Including
descriptive names for variables as
LABELS.
Introduction
We illustrate how to make column
heading easy to understand using a LABEL
statement in a SAS DATA step. The illustrations
use data read by a simple
SAS program that
consists of a portion of the full
data from a study of Intensive
Care.
|
|
Detail
for
|
Result
|
SAS Keywords/Code
|
Detail
|
|
a. Adding Descriptive Labels to
variables
|
1a1, 1a2
|
DATA d; LABEL ...
|
|
- Labels are a maximum of 40
characters/blanks.
- Include SAS variable name as last part of
LABEL
- The option LABEL (or SPLIT="/") is needed
for LABELS to be used in PROC PRINT.
- Labels will be printed on separate lines
with breaks at blanks.

|
Detail
for
|
Result
|
SAS Keywords/Code
|
Detail
|
|
b. Dividing Labels by Lines
|
Table 1b
|
PROC PRINT SPLIT="/";..
|
|
- Use a special character in the LABEL
statement (either / or *)
- Include SAS variable name as last part of
LABEL
- Identify the special character with a SPLIT
="/" options in PROC PRINT

|
|