BookmarkSubscribeRSS Feed
DougZ
Obsidian | Level 7

My team uses SAS  9.4 (TS1M3) on Linux 2.6.32-754.el6.x86_64 (LIN X64) platform.  Proc Compare has been a part of our production data validation each month.  We use counts of differences as shown in Proc Compare's (proc compare base=work.prior compare=work.current listequalvar listvar novalues) output in the Ndif column:

 

Variables with Unequal Values

Variable                 Type  Len  Ndif   MaxDif  MissDif

acquired_dt              NUM     8     3     4750        1
bkr_code                 CHAR    2  7495              7364
bkr_status               CHAR    1  7576              7318
orig_dt                  NUM     8     2      911        0
clnt_inv                 CHAR    6 65810                 0
corpadv_r                NUM     8 36885   117431        0
corpadv_r3               NUM     8197427  2151214        0
corr_data                CHAR    6 63001             63001
distrib_ty               CHAR    1  1272                 0
esc_doc_ty               CHAR    2    37                 0
escr_bal                 NUM     86.37E6   229448        0

...

 

Note however that there is no space or delimiter between "Len" and "Ndif".  My team's SAS code to parse this produced incorrect values today since it couldn't distinguish between the "8" for Len, and the remaining count (Ndif).  Yes, there are several ways to work around this, but the fact is, it is a bug.  SAS should fix it.  They should have fixed it long ago.

2 REPLIES 2
SASKiwi
PROC Star

I agree but also think that PROC COMPARE output could do with other improvements including proper ODS support. I'm happy to support / raise a SASware ballot suggestion if you wish.  

DougZ
Obsidian | Level 7
That would be great (SAS ballot)!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2 replies
  • 945 views
  • 0 likes
  • 2 in conversation