BookmarkSubscribeRSS Feed
stat_sas
Ammonite | Level 13

Hi Experts,

While reading a very large data (Millions of record in data file with both character and numeric variables) using input statement, what is the best way to validate the total data is completely read or something is missing?


Thanks in advance for your suggestions.



2 REPLIES 2
Tom
Super User Tom
Super User

Read the notes in the log.

NOTE: 19 records were read from the infile TMPFILE1.

      The minimum record length was 17.

      The maximum record length was 21.

NOTE: The data set WORK.WANT has 19 observations and 5 variables.

Peter_C
Rhodochrosite | Level 12

The MEANS procedure could give you counts for missing cells in all columns with brief code like :

proc means noprint;

var _numeric_ ;

Output nmiss=;

run ;

%let missDS= &SYSLAST ;

I assumed you would execute this code straight after the input step so the procedure default input dataset name rule applies (most recently created dataset).

With no OUT= defined on the OUTPUT statement tge procedure creates new table in the DATAn sequence which my syntax collects from &SYSLAST.

This table has one row with a counter variable named like the numeric variables in your input dataset. These count the missing cells. I guess you hope for a set of zeroes.

Good luck

peterC

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 2 replies
  • 717 views
  • 3 likes
  • 3 in conversation