DATA Step, Macro, Functions and more

What is a short line in Infile statements?

Reply
Occasional Contributor
Posts: 7

What is a short line in Infile statements?

Hi all,

 

When it comes to reading in raw data with Infile statements, can someone explain what a 'short line' is?

 

This seems to play a big part in distinguishing between Missover, stopover and truncover?

(It would be great to get an explanation of the differences here too!)

 

Is it to do with the row of data being read in to have fewer columns or  entries than expected?

 

Thanks very much,

Bhagya

PROC Star
Posts: 549

Re: What is a short line in Infile statements?

Posted in reply to Bhagya_raj

below is good paper about this

 

http://www2.sas.com/proceedings/sugi26/p009-26.pdf

 

Super Contributor
Posts: 320

Re: What is a short line in Infile statements?

[ Edited ]
Posted in reply to Bhagya_raj

If you're just asking what the term "short line" is, then yes, it's a line of input data that has a record length that is less than the longest requested record length by the INPUT statement.

The missover/stopover/truncover options determine what to do when that happens (when SAS attempts to read past a line delimiter, meaning a CR/LF/whichever or both are used by your OS/program).

 

Kiranv's linked paper explains them well, but in brief:  STOPOVER says to treat as an error any time it attempts to read past a line delimiter.  MISSOVER says to treat any variable that extends past the line delimiter as missing (including one that starts before it).  TRUNCOVER is similar but does not treat a variable that starts before the line delimiter as missing, it just truncates it to the line delimiter.  FLOWOVER basically ignores the line delimiter and keeps looking for more data after it (and is default).

Ask a Question
Discussion stats
  • 2 replies
  • 170 views
  • 1 like
  • 3 in conversation