As the first step in the decommissioning of sasCommunity.org 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
- %COMPARWS: Compare with summary: a macro using Proc Compare to write a file of differences to edit and use for updates
- Author: Ronald_J._Fehd
- SUGI23.170.1998, Poster, 4 pages
Download the zip: http://www.sascommunity.org/wiki/Image:Comparws.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.'; 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
- %INVALID: a data review macro using Proc Format option other=Invalid to identify and list outliers
-- created by User:Rjf2 18:33, 21 June 2007