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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.