I don't know why this isn't working. Is seems to be related to the delimiter. If I change the delimiter to something else, it works fine. I'd really like to get this working for tab delimited records. Am I missing something?
This works fine:
infile cards dlm='#';
input Size :comma8. FileName :$50.;
This is the error I get:
NOTE: Invalid data for Size in line 460 1-80.
461 54332 d:\FTR\Mars File.pdf
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Size=. FileName=54332 d:\FTR\Mars File.pdf _ERROR_=1 _N_=1
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.FILELIST has 1 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
You get a different problem if you take out the colons. It works fine except the format for SIZE is too short so the second value is truncated. If you increase the size of the informat to comma10, you get an invalid value for the first row. If you add a space after 123,345, that error goes away. I don't completely understand what is going on, but though I would share it with you.