Chapter Contents |
Previous |
Next |
CALL LABEL |
Category: | Variable Control |
Syntax | |
Arguments | |
Details | |
Examples | |
See Also |
Syntax |
CALL LABEL(variable-1,variable-2); |
Note: To conserve space, you should set the length of variable-2 to the length of the label for
variable-1, if it is known.
Details |
The CALL LABEL routine assigns the label of the variable-1 variable to the character variable variable-2.
Examples |
This example uses the CALL LABEL routine with array references to assign the labels of all variables in the data set OLD as values of the variable LAB in data set NEW:
data new; set old; /* lab is not in either array */ length lab $256; /* all character variables in old */ array abc{*} _character_; /* all numeric variables in old */ array def{*} _numeric_; do i=1 to dim(abc); /* get label of character variable */ call label(abc{i},lab); /* write label to an observation */ output; end; do j=1 to dim(def); /* get label of numeric variable */ call label(def{j},lab); /* write label to an observation */ output; end; stop; keep lab; run;
See Also |
Function:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.