Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- libname raw "P:/Data/2019-11-26" ;
- libname newraw "P:/Data/2019-11-27" ;
- *Get names of all datasets;
- proc contents data=raw._all_ out=raw(keep=memname name label);
- run;
- proc contents data=newraw._all_ out=newraw(keep=memname name label);
- run;
- *Compare contents;
- proc compare data=raw compare=newraw;
- run;
- *This will compare the datasets;
- %macro compare;
- proc sql;
- select count(distinct memname)
- into: count trimmed
- from raw;
- select distinct(memname)
- into: ds1 - :ds&count
- from raw;
- quit;
- %do i= 1 %to &count;
- proc compare data=raw.&&ds&i compare=newraw.&&ds&i;
- run;
- %end;
- %mend compare;
- %compare;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement