Chapter Contents |
Previous |
Next |
VARLABEL |
Category: | SAS File I/O |
Syntax | |
Arguments | |
Details | |
Comparisons | |
Examples | |
See Also |
Syntax |
VARLABEL(data-set-id,var-num) |
Tip: | This number is next to the variable in the list that is produced by the CONTENTS procedure. |
Tip: | The VARNUM function returns this number. |
Details |
If no label has been assigned to the variable, a blank string is returned.
Comparisons |
VLABEL returns the label that is associated with the given variable.
Examples |
This example obtains the label of the variable NAME in the SAS data set MYDATA.
Obtaining the Label of the Variable NAME
%let dsid=%sysfunc(open(mydata,i)); %if &dsid %then %do; %let fmt=%sysfunc(varlabel(&dsid, %sysfunc(varnum (&dsid,NAME)))); %let rc=%sysfunc(close(&dsid)); %end;
See Also |
Functions:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.