The INPUT statement processes trailing tabs in numeric fields as invalid data for 64-Bit Windows


The INPUT statement processes a trailing tab in a numeric field as invalid data. An Invalid Data NOTE is written to the log and the resulting variable contains a missing value.

 

Sample code to illustrate the Invalid Data Note in the SAS log: 

/*The first DATA step creates a file 'c:\temp\tstdata.txt' with a trailing tab on the second record. The '09'x is the hexadecimal representation of a tab. The second DATA step reads that file to create a data set. */

data _null_;
  file 'c:\temp\tstdata.txt';
  put @1 'Joe' @7 '100' @12 '14';
  put @1 'Sarah' @7 '98' @9 '09'x;
  put @1 'Bob' @7 '82' @12 '11';
run;

data scores;
  infile 'c:\temp\tstdata.txt' truncover;
  input name $1-5 score 7-10 age 12-13;
run;

 

The SAS log with the NOTE Invalid Data message: 

 

318  data scores;
319    infile 'c:\temp\tstdata.txt' truncover;
320    input name $1-5 score 7-10 age 12-13;
321  run;

NOTE: The infile 'c:\temp\tstdata.txt' is:
      Filename=c:\temp\tstdata.txt,
      RECFM=V,LRECL=32767,File Size (bytes)=41,
      Last Modified=29Jul2026:16:30:57,
      Create Time=26Aug2025:10:42:22

NOTE: Invalid data for score in line 2 7-9.
RULE:     ----+----1----+----2----+----3----+----4----+----5----

2   CHAR  Sarah 98. 9
    ZONE  567662330
    NUMR  312180989
name=Sarah score=. age=. _ERROR_=1 _N_=2
NOTE: 3 records were read from the infile 'c:\temp\tstdata.txt'.
      The minimum record length was 9.
      The maximum record length was 13.
NOTE: The data set WORK.SCORES has 3 observations and 3
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds