Sugi23.170

From sasCommunity

Jump to: navigation, search

SUGI23.170, Poster, 4 pages

[edit] %ComparWS: Compare with summary: a macro using Proc Compare to write a file of differences to edit and use for updates

Ronald Fehd,

Centers for Disease Control and Prevention, Atlanta, GA.

http://www2.sas.com/proceedings/sugi23/Posters/p170.pdf

http://www.sascommunity.org/wiki/Image:Comparws.zip

ABSTRACT

Data review can be viewed as a two-step process:

1. Compare: review differences between two data sets.

2. Exception Report: review data consistency with range and logic checks.

A data set may be updated with a file containing sets of these three statements -- ID, assignment and closure:

* if ID = 1 then do;
* <variable name> = <value>;
* end;

This paper reviews the proc COMPARE output data set and the manipulation of that data set which is necessary to write a report to a file which contains update statements in an easily editable form. Summary information is written at the end of the update file. The output file is in this form:

if ID = 1 then do;
* VAR_A = 'A4Q3J';
* VAR_A = 'A4Q8J';
* diff: = '...X.';
end;

where ‘X’ in the value of Dif indicates the position of difference of the values in the Base and Compare data sets.

Keywords: Compare, corrections, macro arrays, nobs, Transpose, updates

See also:

http://www.sascommunity.org/wiki/ChekOut.sas


%INVALID: a data review macro
          using Proc Format option other=Invalid
          to identify and list outliers

http://www.pace.edu/nesug/proceedings/nesug01/at/At1008.pdf

http://www.lexjansen.com/pharmasug/2004/DataManagement/DM06.pdf

Personal tools