BookmarkSubscribeRSS Feed
ciro
Quartz | Level 8

Hi,

I would like to identify the records that in proc compare output dataset have equal values in some numeric variables.

the problem is that numeric variables with equal values are marked as E. I don't know how to refer to this value. I have tried with varx=0 or varx=E or varx='E' or -0.1 le varx le 0.1 but none seems to work.

any suggestion is greatly appreciated

thank you in advance

 

 

 

 

 

 

 

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Maybe they are missing values.

Try   VARX = .E

JonathanWill
Obsidian | Level 7

You've not an example of your code, but assuming you're looking at the diff output dataset from proc compare, it uses the missing value .E for equal.

 

So you can do something like 

data thesame;
  set comparison(where=(fieldtocheck=.E));
run;

Sometimes forget that SAS has many different missing values (. .A -- .Z ._ , possibly others) and occasionally they are used to represent specific things.  

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1295 views
  • 1 like
  • 4 in conversation