We encounter the following problem when trying to read in a simple CSV file which on the first row has an incomplete date (only the year) and on the second row a complete date. Here is a simplified version of the CSV file that can be used to demonstrate the issue: text,start,end abc,1968,1989 def,1981,2/14/2011 When we try to read this in with proc import using guessingrows=3, or higher, like this: proc import out=test datafile='<path>/test.csv' dbms=csv replace; guessingrows=3; getnames=yes; run; then we get an error for the first data row because proc import chooses to use: "informat end mmddyy10.;", and "1989" does not follow that format. If we use guessingrows=2; then it correctly notices that the first data row is not a date and it uses "informat end best12.;" (which then of course gives, as expected, an error for the second data row). What should have happened I would think, is that with "guessingrows" set to 3 or higher it should have seen that it needs to use neither a numeric nor a date format but a character one like "informat end $9.;". It appears that this is a bug in proc import.
... View more