This is the article that made me understand it
https://www.lexjansen.com/nesug/nesug01/cc/cc4018bw.pdf
Hope it helps 🙂
_infile_ basically holds the current entire line of an external file being read. So you can treat it much like any other string variable .
Brief example:
data example ; infile datalines truncover; input x $25.; put 'when read: ' _infile_; _infile_ = translate(_infile_,'X3L','1el'); put 'when modified: ' _infile_; datalines; 1 some text null 3 ;
I have mostly used the variable for parsing badly structured files to find key lines in the data and executing condition Input statements.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.