![]() Chapter Contents |
![]() Previous |
![]() Next |
| VARNAME |
| Category: | Variable |
| Syntax | |
| Example | |
| See Also |
Syntax |
| var-name=VARNAME(table-id,var-num); |
Type: Character
Type: Numeric
Type: Numeric
| Example |
Copy the names of the first five columns in the SAS table CITY into an SCL variable. The column names are separated by blanks.
length varlist $ 80;
tableid=open('city','i');
varlist=' ';
do i=1 to min(5,attrn(tableid,'nvars'));
j=9*(i-1)+1;
substr(varlist,j,8)=varname(tableid,i);
end;
put varlist=;
rc=close(tableid);
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.