BookmarkSubscribeRSS Feed
asuman
Obsidian | Level 7
Values Comparison Summary                                                                                                           
                                                                                                                                    
Number of Variables Compared with All Observations Equal: 0.                                                                        
Number of Variables Compared with Some Observations Unequal: 1.                                                                     
Total Number of Values which Compare Unequal: 389124.                                                                               
                                                                                                                                    
                                                                                                                                    
All Variables Compared have Unequal Values                                                                                          
                                                                                                                                    
Variable  Type  Len   Label          Ndif   MaxDif                                                                                  
                                                                                                                                    
Receipt   CHAR   13   Recipt Number389124                                                                                           
                                                
When we use proc compare ,then we get a report in results tab,so under variables with unequal values we have a summary of variables(I have also highlighted in bold).
From that highlighted summary i want to create a data set which with variable and ndif column only.
Thanks you.

 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Could you please re-format your text so we don't have to scroll right and left to read it? Thanks!

--
Paige Miller
asuman
Obsidian | Level 7
When we use proc compare ,then we get a report in results tab,so under variables with unequal values we have a summary of variables(I have also highlighted in bold).From that highlighted summary i want to create a data set which with variable and ndif column only.
Thanks you.
sbxkoenk
SAS Super FREQ

Use something like this:

proc compare base=emp95_byidnum compare=emp96_byidnum
             out=result outnoequal outbase outcomp outdif
     noprint;
   id idnum;
run;

Koen

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 649 views
  • 0 likes
  • 3 in conversation