I have a .csv data file that looks like this:
encore,alcore,4072,4072,,L,L,PhonErr
leopard,alligator,14877,14877,0.36,L,H,SemErr
apple,apple,1973,1973,1,L,H,Correct
salary,appliance,7168,7168,0,H,L,Unknown,
diffusion,appreciation,7272,7272,0.04,L,L,PhonErr
umbrella,arrow,6420,6420,0.16,L,H,Unknown
college,attendance,3885,3885,0.56,H,H,SemErr
body,bank,1890,1890,0.02,H,H,Unknown
I try to read it into a SAS data set with the following code:
DATA test;
infile "PATH.test.csv" dsd delimiter=',';
input target $ response $ rt1 rt2 lsa freq $ imig $ resp_type $;
run;
PROC PRINT data=test;run;
When I do so, however, the printed data set only includes the first row and the last row of my csv file. That is, it only displays the lines beginning with "encore" and "bank". These two rows are formatted correctly, but none of the other rows have made it into the data set. There is no error in the log. The log says,
NOTE: 2 records were read from the infile "PATH\test.csv".
The minimum record length was 37.
The maximum record length was 256.
Anyone have any idea what is going on? I don't understand why this code won't read it in correctly. This is essentially the same code I use every other time I read in a csv file and it has never done anything like this. In fact, using similar code on other csv files works just fine. For some reason, though, it refuses to read in this file.