The ANYDTDTE, ANYDTDTM, and ANYDTTME informats do not read special missing values correctly


When reading numeric data into SAS®, it is often helpful to assign characters in your input data to represent special missing values for numeric data. The MISSING statement specifies the value in your input data that represents a special missing value. This can be any of the letters of the alphabet or the underscore character.

The ANYDTDTE, ANYDTDTM, and ANYDTTME informats do not read the special missing values correctly. Instead of showing the letter or underscore from the input data in the output, a period is shown instead.

To circumvent the problem, use a different informat to read the input data that contains special missing values.

The sample code below illustrates that the ANYDTDTE informat does not handle special missing values correctly. 

data _null_;
   missing A;
/* The DATE informat handles special missing values correctly */
   x=input('A',date.);
   put x=;

/* The ANYDTDTE informat does not handle missing values correctly */
   y=input('A',anydtdte.);
   put y=;
run;


The DATE informat correctly displays 'A' for the value of X, whereas Y displays a period.