![]() Chapter Contents |
![]() Previous |
![]() Next |
| CALL VNAME |
| Category: | Variable Control |
| Syntax | |
| Arguments | |
| Details | |
| Examples | |
| See Also |
Syntax |
| CALL VNAME(variable-1,variable-2); |
| Details |
The CALL VNAME routine assigns the name of the variable-1 variable as the value of the variable-2 variable.
| Examples |
This example uses the CALL VNAME routine with array references to return the names of all variables in the data set OLD:
data new(keep=name);
set old;
/* all character variables in old */
array abc{*} _character_;
/* all numeric variables in old */
array def{*} _numeric_;
/* name is not in either array */
length name $32;
do i=1 to dim(abc);
/* get name of character variable */
call vname(abc{i},name);
/* write name to an observation */
output;
end;
do j=1 to dim(def);
/* get name of numeric variable */
call vname(def{j},name);
/* write name to an observation */
output;
end;
stop;
run;
| See Also |
| Functions:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.