I have two datasets (ABC1/ABC2), where i need to validate that they are exactly similar (values wise and structure wise) and need to generate a report,
proc compare base=ABC1 compare=ABC2
briefsummary listall;
run;
Issue here is that the dataset ABC2 doesnt contains the variable attribute values like (format, Informat and Label).
Hence the report that is being generated is including all the variables as mismatch because of the misiing attribute values of the variables in ABC2.
I need the output as
Comparison of two dataset based on their variable name, type and length only, the comparison should not include mismatches for their formats, informats or label.
How can I customise the output for this comparison?
You can add to FORMAT statements, resetting all the format information like so:
proc compare
base=ABC2
compare=ABC1
novalues
LISTVAR
;
format _numeric_;
format _character_;
run;
Bruno
Try limiting output with ODS select?
ODS select comparesummary;
I need to omit only the data under the header "Listing of Common Variables with Differing Attributes".
Unable to get the desired result from
---ODS select comparesummary;
You can add to FORMAT statements, resetting all the format information like so:
proc compare
base=ABC2
compare=ABC1
novalues
LISTVAR
;
format _numeric_;
format _character_;
run;
Bruno
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.