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.
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!
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.