Dear All. I've a big question. I'm using SAS 9.3, I've a Macr that I use to check the formats of each variable in a dataset. This is the Macro:
%macro check_format(lib, ds, var, comp);
proc sql noprint;
select informat into: fLength
from dictionary.columns
where libname = upcase("&lib") and memname = upcase("&ds") and upcase(name) = upcase("&var");
quit;
run;
%put This is fLength;
%put &fLength.;
%if (&comp ^= &fLength) %then %do;
data _null_;
put "ERROR: Format of &var is not = &comp, is &fLength ";
call symput('content_check_STOP','1');
run;
%end;
%mend check_format;
If I use this Macro with these paramenters doesn't work:
%check_format(&lib, &dsInOut, SMPLDATE, yymmddn8.);
or:
%check_format(&lib, &dsInOut, SMPLTIME, tod5.);
but the dataset format is correct. The error that i get is:
ERROR: Format of SMPLDATE is not = yymmddn8., is
It seems that select informat returns ''. Could you please help me? Thank you very much.
... View more