Using a User-Created Informat to Filter Input Data (Separating Invalid and Missing Values) - SAS Programming

To keep track of miscoded values separately from missing values, you can write:

Example

PROC FORMAT;
INVALUE $GENDER 'M', 'F',' '=_SAME_
OTHER ='X'; -
RUN;
DATA SCREEN7;
INPUT II IB 3.
€4 GENDER $GENDER1. ;

Here you add a blank (a missing character value) to the first list and code all other values to 'X'.Thus, the values 'M', 'F', and ''(missing) are not modified, while all other values are assigned a value of 'X'. You can use informats for numeric as well as character values.The next example demonstrates such a use.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAS Programming Topics