*
;
/*
Looks for the number of variables in a SAS data set
+*******************************************+
| Christopher Zogby |
| SAS Programmer/Analyst |
| Pharmaceutical Outcomes Research, Inc. |
| 435 Lawrence Bell Drive |
| Williamsville, NY 14221 |
| Phone: (716) 633-3463 |
| Fax: (716) 633-7404 |
| e-mail: chris@phor.com |
+*******************************************+
*/
%macro varnum(dsn);
proc contents data=&dsn noprint out=_out_(keep=varnum);
run;
data _null_;
set _out_ end=eof;
if eof then call symput('varnum',trim(varnum));
run;
%put Number of variables in data &dsn = &varnum.;
%mend varnum;
*;