BookmarkSubscribeRSS Feed
rwnj
Calcite | Level 5

I'm running a basic Proc compare:

proc compare base=basefile compare=comparefile;

id idfield;

run;

The results show discrepancies in 28 fields, and SAS goes on give short samples of the differences that exist between each file's fields (Value Comparison Results for Variables). However the results are incomplete, only about 14 fields are shown. Is this a bug? I'd like to see the complete list.

3 REPLIES 3
allurai0412
Fluorite | Level 6

PROC COMPARE

   This procedure is used to give the full description to observation wise.

By default it gives the details of unrelated values.

seems 14 fields are only have unrelated values !!!

If you want to compare exact variables b/n two data sets..

Proc compare base=one compare=two nosummary;

Var id1;

With id2;

Title 'Comparing Variables with Different Names';

Run;

Regards,

ALLU

rwnj
Calcite | Level 5

I'm not quite sure what unrelated values means, can you point to SAS literature that defines "unrelated values"?

All fields, in terms of format, etc. should be identical.

Thanks!!

ballardw
Super User

Try adding PRINTALL to the proc call to get all differences.

It is also a good idea to make sure the data sets are both sorted by the ID variable if you haven't already done that.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 875 views
  • 0 likes
  • 3 in conversation