As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tips:Quick Check for Missing or Invalid Data Using Formats

From sasCommunity
Jump to: navigation, search
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 the code at right, 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;
Submitted By Don Henderson