BookmarkSubscribeRSS Feed
padmanabh
Calcite | Level 5

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

3 REPLIES 3
smantha
Lapis Lazuli | Level 10

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.

andreas_lds
Jade | Level 19

Please post example data in usable form and show what you expect as output.

 

padmanabh
Calcite | Level 5
Table_NameCust_Name     
No of Records200     
       
       
ColumnsTotal_RecordsMissing_ValuesDuplicatesInvalid_ValuesLookups 
Name_character2000312 
Age_numeric1991503  
       
       

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 583 views
  • 0 likes
  • 3 in conversation