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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.