So if you try to read the variable FORCE (10th column in your raw data file) as a number then DQ will automatically be converted by SAS as missing value. So you just need code to convert the 'DQ' in the character variables. array _c _character_; do over _c ; if _c='DQ' then _c='.'; end Personally I would set the character variables to blank instead of '.' . If you want to avoid the error message about invalid data then you could create an informat. You could create a character informat also. But here is another trick that will do without informats or looping code. The idea is to convert the data in the input buffer before reading the line into the variables. Add these two lines to you current program right before the INPUT statement. input @; _infile_ = tranwrd(_infile_,'DQ',' .'); SAS will read the period as missing for numeric with the conversion error messages that you are getting when it sees the DQ. The character variables all become blank (the dot will disappear). Example: data test; infile cards firstobs=2 truncover; input @; put _infile_; _infile_ = tranwrd(_infile_,'DQ',' .'); put _infile_; input btch $ glue $ clamp $ overlap $ stick color $ user $ jig caliper force break $ quality; put (_all_) (=) /; cards; batch glue clamp overlap sticks colour user jig caliper force break quality CCM2B C C M 2 B N.R 3 20 12.5 w 6 CCM2B C C M 2 B N.R 3 18.6 DQ DQ 0 CCM2B C C M 2 B S.J 3 17.6 7 w 5 run; CCM2B C C M 2 B N.R 3 20 12.5 w 6 CCM2B C C M 2 B N.R 3 20 12.5 w 6 btch=CCM2B glue=C clamp=C overlap=M stick=2 color=B user=N.R jig=3 caliper=20 force=12.5 break=w quality=6 CCM2B C C M 2 B N.R 3 18.6 DQ DQ 0 CCM2B C C M 2 B N.R 3 18.6 . . 0 btch=CCM2B glue=C clamp=C overlap=M stick=2 color=B user=N.R jig=3 caliper=18.6 force=. break= quality=0 CCM2B C C M 2 B S.J 3 17.6 7 w 5 CCM2B C C M 2 B S.J 3 17.6 7 w 5 btch=CCM2B glue=C clamp=C overlap=M stick=2 color=B user=S.J jig=3 caliper=17.6 force=7 break=w quality=5
... View more