DATA Step, Macro, Functions and more

Proc Compare Ndif Bug

Posts: 22

Proc Compare Ndif Bug

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.

Super User
Posts: 4,034

Re: Proc Compare Ndif Bug

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.  

Posts: 22

Re: Proc Compare Ndif Bug

That would be great (SAS ballot)!
Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation