Checking Ranges for Several Variables
In this final section of this chapter, the range checking macro developed on page 35 is expanded to do two things: One, make the macro more flexible so that it can either treat missing values as valid or invalid; and two, allow the macro to be called multiple times with different numeric variables and produce one consolidated report when finished. The macro is listed first, followed by a step-by-step explanation.
Program 2-24. Writing a Program to Summarize Data Errors on Several Variables
*---------------------------------------------------------------* | PROGRAM NAME: ERRORSN.SAS IN C:\CLEANING | | PURPOSE: Accumulates errors for numeric variables in a SAS | | data set for later reporting. | | This macro ... |
Get Cody’s Data Cleaning Techniques Using SAS® Software now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.