I stumbled upon this code, but was unable to get it to work. I am guessing since 2010 the syntax has changed a bit. In any case here is an update in case anyone needs to do this:
data _null_;
infile 'C:\FillMeIn\test.log';
input @;;
if _infile_ ne ' '; * not blank ;
if '0' < substr(_infile_,1,1) <= '9'; * begins with number ;
num_end = index(_infile_, ' '); * find blank ;
_infile_ = substr(_infile_, num_end); * take rest of line ;
file 'C:\FillMeIn\test_no_line_numerbers.log';
put _infile_;
run;
You may also open your log file with a good programing editor like Notepad++, select the section that you want and use the command Delete line numbers or first word.
PG
I pasted into Excel, using the text import wizard I set the fixed width so it made a column break after the line number, then I simply copied the second column.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.