DATA Step, Macro, Functions and more

Skipping bad lines in infile

Reply
Frequent Contributor
Posts: 94

Skipping bad lines in infile

Is it possible to inform SAS to skip faulty lines in an infile statement?  I'm trying to parse a dirty sequential mainframe file and it's stopping on the bad record.

Super User
Super User
Posts: 7,935

Re: Skipping bad lines in infile

Posted in reply to tomcmacdonald

Can you tell which are the bad lines?

data want ;
  infile myfile;
  input @ ;
  if index(_infile_,'BAD LINE') then delete;
  ....
run;
Ask a Question
Discussion stats
  • 1 reply
  • 90 views
  • 0 likes
  • 2 in conversation