BookmarkSubscribeRSS Feed
Doug
Calcite | Level 5

I am comparing two datasets where the following values exist on the same records in both:

^S={font_face=Symbol}£^S={}0.25

I visually inspected the values and even copied them to EXCEL (EXCEL says they are equal)...I also used the STRIP function to remove any leading or trailing blanks. Any ideas as to why SAS says they are not equal?

4 REPLIES 4
Amir
PROC Star

Hi,

Does one of the columns have a format applied to it, perhaps?

What do you get if you submit the following?:

data have1;

  a='^S={font_face=Symbol}£^S={}0.25';

run;

data have2;

  a='^S={font_face=Symbol}£^S={}0.25';

run;

proc compare base   =have1

             compare=have2;

run;

The above shows no difference on SAS 9.1.3 on PC and Mainframe.

Regards,

Amir.

Doug
Calcite | Level 5

These come out the same. I think it was due to the word "symbol" having a capital letter in one instance and not in the other.

MumSquared
Calcite | Level 5

If you do not care about case then you can use upcase() to convert the text to all be upper case when you strip out the spaces.

I often use upcase(compress(variable)) when manually coding text matching, compress removes the spaces within the text too.

Watch out for spelling mistakes when comparing text this way - I have seen 5 different ways of spelling coffee!

ballardw
Super User

Five ways to spell coffee is nothing, I had some survey data where IBM was spelled 18 ways. The most creative was I>B>M> .

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2408 views
  • 0 likes
  • 4 in conversation