How can we distinguish a " " (blank) value with a null (missing) value for a character variable. Suppose I have a field in my input file with a field that can accept blank as a valid value:
Comma Delimited
Name (length = 20), At 25 Salary, Flag, Date of Birth (DDMntYY format),
Joe Williams, 70000, ,17Apr80
David Coleman, 91000,Y,29Nov70
Terrin Larson, 65000,F,01Jan00
Mathew Richardson, 85000,,02May78
There are number of missing values in this file. The last record has a missing value for the field "Flag", but the first record has a " " (blank) and valid value for this field. How can one read this file and capture the missing value distinguished from " " value?
I tried the below code for handling the subsequent ",". But don`t know how to know that the first record has a valid " " value for flag and the last record does not.
data MyLib.EmployeesWithFlag;
infile EmpFile dlm=',' firstobs=3 MissOver DSD;
length name $ 20.;
input name salary flag $ DoB Date7.;
run;
Thanks in advance for your taking time on this question.
Ramin