Hi,
I want to create a validation summary report for a table or a csv file. I have a sql table with x columns and the x columns has y no of records. The validations include lookups,missing values, duplicates and invalid values.
e.g. name1
numeric1
date1
name2
The data I have taken from sql which is imported using the proc import data= option.
Now, I would like to have a report with each column against which the number of invalid records. On top of the report the overall no of records provided and the table name or csv filename.
I am using the sas university edition to do this.
Could anyone please guide on how do I do this, I am pretty new to sas and can do the basics
There is no single step that will give you this answer. You have to define what lookups and invalids mean. Other wise the closest that comes to the description you have is
proc summary data=inputdata missing no print;
class _character_;
output out=summary(drop=_:) n= nmiss= max= min=/autoname;
run;
proc summary data=inputdata missing no print;
class _numeric_;
output out=summary(drop=_:) n= nmiss= max= min=/autoname;
run;
However the output itself can be little confusing. IF you are familiar with macros you can do the above for each variable by placing them in a macro loop.
Please post example data in usable form and show what you expect as output.
Table_Name | Cust_Name | |||||
No of Records | 200 | |||||
Columns | Total_Records | Missing_Values | Duplicates | Invalid_Values | Lookups | |
Name_character | 200 | 0 | 3 | 1 | 2 | |
Age_numeric | 199 | 1 | 50 | 3 | ||
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.