I have two folders (librefs) containing numerous datasets. Each folder contains identical datasets and I'd like to compare SPECIFIC datasets (not all) within each folder to ensure they are similar. Is it possible to loop through each folder and compare each dataset?
proc sql;
create table specific_tables (table_name CHAR(100));
insert into all specific_tables
values(name_of_dataset1)
values(name_of_dataset2)
values(name_of_dataset3)
values(name_of_dataset4)
values(name_of_dataset5)
;
quit;
Both folders contain these datasets. How can I loop through this table of datasets and compare them from each folder?
%macro compare;
libname a "file path";
libname b "file path";
%do i %to number of datasets to compare;
proc compare base = a.name_of_dataset&i
compare= b.name_of_data&I
run;
%end;
%mend;
I would recommend a slightly different structure.