BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sAura
Fluorite | Level 6

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

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

View solution in original post

3 REPLIES 3
Reeza
Super User

Try limiting output with ODS select?

 

ODS select comparesummary;

sAura
Fluorite | Level 6

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;

 
BrunoMueller
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1526 views
  • 2 likes
  • 3 in conversation