As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Macro ComparWS Compare with summary

From sasCommunity
Jump to: navigation, search

Download the zip:


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.';

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


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

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