/*
You also could try copy dataset.
If it was corrupted,you would see an error info in log.
*/
%let path= c:\temp ;
options validvarname=any validmemname=extend nofmterr ;
filename x pipe %sysfunc(quote(dir "&path.\*.sas7bdat" /s /b));
data _null_;
infile x length=len;
input path $varying200. len;
call execute(catt("options obs=1;data x;set '",path,"';run;"));
run;
options obs=max;
I was recently tasked with this and found that the fastest and easiest way to test a data set is using a procedure like proc print as shown below with the obs=0 option on the data set. No matter how large the SAS data set is, it runs in a fraction of a second and produces no output to the results window.
proc print data=<SAS data set name>(obs=0);
run;
Or
proc print data="<full file path to sas7bdat file>"(obs=0);
run;
The latter method is better in case the file is not a SAS data set and does not show up in the SAS library. It will return a damaged message or a message stating that it is not a SAS data set.
Cheers,
Brian
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.