BookmarkSubscribeRSS Feed
🔒 This topic is locked. We are no longer accepting replies to this topic. Need further help? Please sign in and ask a new question.
SAS_Tipster
Moderator

You can use formats to do a quick check for missing or invalid data by creating formats that map the values and then using, for example, PROC FREQ to generate a simple report. In sample the code below, numeric and character formats are created to group the values and then PROC FREQ is used to provide a simple/quick QC report.

  • the special variable list _character_ is used to assign the $missing. format to all the character variables
  • the special variable list _numeric_ is used to assign the missing. format to all the numeric variables
proc format;
 value missing low-high = 'Value'
                  other = 'Missing';
 value $missing ' ' = 'Missing'
              other = 'Value';
run;
proc freq data=sashelp.class;
 tables _all_/missing;
 format _character_ $missing. _numeric_ missing.;
 title 'Quick QC Check';
run;

Thanks to Don Henderson for sharing this tip on sasCommunity.org.

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!

Visit a random SAS tip This SAS Tips board is not open for replies or comments, but we welcome your feedback and questions. Have a question or comment about this tip? Start a new topic in one of our discussion boards, and reference this tip topic.
Discussion stats
  • 0 replies
  • 2222 views
  • 3 likes
  • 1 in conversation