Macro ComparWS Compare with summary

From sasCommunity
Jump to: navigation, search

Download the zip: 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

References

-- created by User:Rjf2 18:33, 21 June 2007

--Ronald_J._Fehd macro.maven == the radical programmer