It's hard to tell, because I can't see your exact code!
If it's exactly as the link has it, I'd modify it to this:
do while(not done);
myfilename = filepath;
input @;
if reclen >= 2 then do;
input name $ x1 x2 x3 @;
output;
end;
input;
end;
The input @; will read the record but not process it and not release it; nevertheless it populates reclen. If the length is 2 or more, read the fields you want and write out an observation. Again the trailing @ will not release the record. At the end of the do block, the record is again processed as a null process, but releases it so that the next input will carry on correctly.
I should think that this will give you quite an improvement, especially if you've got a lot of variables to read.
... View more