Chapter Contents |
Previous |
Next |
VARINFMT |
Category: | SAS File I/O |
Syntax | |
Arguments | |
Details | |
Examples | |
See Also |
Syntax |
VARINFMT(data-set-id,var-num) |
Tip: | This number is next to the variable in the list produced by the CONTENTS procedure. |
Tip: | The VARNUM function returns this number. |
Details |
If no informat has been assigned to the variable, a blank string is returned.
Examples |
%let dsid=%sysfunc(open(mydata,i)); %if &dsid %then %do; %let fmt=%sysfunc(varinfmt(&dsid, %sysfunc(varnum (&dsid,NAME)))); %let rc=%sysfunc(close(&dsid)); %end;
data vars; length name $ 8 informat $ 10 ; drop dsid i num rc; dsid=open("mydata","i"); num=attrn(dsid,"nvars"); do i=1 to num; name=varname(dsid,i); informat=varinfmt(dsid,i); output; end; rc=close(dsid); run;
See Also |
Functions:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.