First thing is replace the block of in-line data with a RUN statement to make the end of the data step.
Do you have the same fixed position file? If so then you need to make sure to include the TRUNCOVER option on the INFILE statement or else SAS will go to the next line when you read past the end of a line.
data addresses;
infile 'myfile.txt' truncover;
length addr1 addr2 $50;
input
@01 id $9.
@@11 addr1 $40.
@60 addr2 $40.
;
....
run
Or do you actually have a CSV file? That is a file with commas between the values? If so then you need to change the INPUT statement also so that it uses LIST MODE input style instead of FORMATTED MODE. And you will probably need to add the DSD option so that missing values are read properly and quotes added around values with commas in them are properly read.
To keep the LIST MODE informat even with in-line informat specifications in the INPUT statement you can add the colon modifier.
data addresses;
infile 'myfile.csv' dsd truncover;
input id :$9. addr1 :$50. addr2 :$50.;
....
run
If the delimiter is some other character add the DLM= option to the INFILE statement. If there is a header row then add the FIRSTOBS=2 option
... View more