<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to remove log numbers? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21491#M4552</link>
    <description>This will only work for last submitted code. &lt;BR /&gt;
&lt;BR /&gt;
Run&amp;gt; Recall Last Submit. &lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Reeza</description>
    <pubDate>Mon, 25 Oct 2010 17:49:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2010-10-25T17:49:41Z</dc:date>
    <item>
      <title>How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21489#M4550</link>
      <description>Experts:&lt;BR /&gt;
Is there a quick way to remove the log line numbers? In the example below, I'm hoping to remove the '483' ...without having to manually do it. Once a while I didn't save the codes but found them in the log files, then have to remove the numbers before I could submit the code again.&lt;BR /&gt;
Thank you!&lt;BR /&gt;
the lazy beginner&lt;BR /&gt;
&lt;BR /&gt;
483  proc print data=work.Ptest;&lt;BR /&gt;
484      format hired birth date7.;&lt;BR /&gt;
485  run;</description>
      <pubDate>Sat, 23 Oct 2010 19:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21489#M4550</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-23T19:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21490#M4551</link>
      <description>No SAS system options.  Suggest using PROC PRINTTO (or CONFIG option ALTLOG=&lt;FILEREF&gt; ) to re-direct the SAS-generated log to an external file and then use a SAS DATA step to INPUT and PUT the log contents, though you will also need to address SAS notes, warnings, maybe even errors, as well as possbly page-title info).&lt;BR /&gt;
&lt;BR /&gt;
You may find that running SAS code from within a SAS macro may provide some limited relief, or at least different behavior, however don't expect the code to have line-breaks where you might normally expect.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/FILEREF&gt;</description>
      <pubDate>Sat, 23 Oct 2010 20:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21490#M4551</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-23T20:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21491#M4552</link>
      <description>This will only work for last submitted code. &lt;BR /&gt;
&lt;BR /&gt;
Run&amp;gt; Recall Last Submit. &lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Reeza</description>
      <pubDate>Mon, 25 Oct 2010 17:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21491#M4552</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2010-10-25T17:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21492#M4553</link>
      <description>And presumes you are running the SAS code interactively, if not already obvious from the last post-reply.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 25 Oct 2010 18:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21492#M4553</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-25T18:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21493#M4554</link>
      <description>Got it. Thank you. Did not know I could have SAS send log to an external file...Also thanks for the second post. It is hard to teach a beginner, isn't it? Don't know what to do if you experts are not here.</description>
      <pubDate>Mon, 25 Oct 2010 19:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21493#M4554</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-25T19:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21494#M4555</link>
      <description>Good reminder. It helps. Thanks!</description>
      <pubDate>Mon, 25 Oct 2010 19:09:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21494#M4555</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-25T19:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21495#M4556</link>
      <description>Here's another trick that can help with LOG files:&lt;BR /&gt;
&lt;BR /&gt;
Get your log into the SAS editor using FILE/OPEN.&lt;BR /&gt;
&lt;BR /&gt;
Press the ALT key and at the same time select the top left-hand corner of your log in the column just to the right of your line numbers by clicking with your mouse button. Now drag the mouse down to the bottom right-hand corner of your log. You should now have highlighted your SAS program without the line numbers.&lt;BR /&gt;
&lt;BR /&gt;
You still have to do some tidying up to get rid of SAS messages but its a whole lot quicker than editing each line. This trick also works in the LOG window.</description>
      <pubDate>Tue, 26 Oct 2010 02:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21495#M4556</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2010-10-26T02:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21496#M4557</link>
      <description>Very interesting and efficient solution. The first several times I tried, all the lines were selected (including line number). But later I pressed down Alt before clicking on the code and moved the mouse downward first then to the right, no line numbers were selected. Thank you!</description>
      <pubDate>Fri, 29 Oct 2010 04:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21496#M4557</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-29T04:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21497#M4558</link>
      <description>and here is another&lt;BR /&gt;
let SAS do the work&lt;BR /&gt;
have a SAS program &lt;BR /&gt;
1 open/read that log, &lt;BR /&gt;
2 recognise relevant lines start with a number&lt;BR /&gt;
3 open an output.sas.txt file&lt;BR /&gt;
4 strip the log line number out of the log line&lt;BR /&gt;
5 write what is left of the log line &lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
infile 'C:\Applications\UK.Liquidity2\altlogs\461.log' ;&lt;BR /&gt;
input @ ;&lt;BR /&gt;
if _infile_ ne ' ' ;  * not blank ;&lt;BR /&gt;
if '0' &amp;lt; substr( _infile_,1,1) &amp;lt;= '9' ; * begins with number ;&lt;BR /&gt;
num_end = index( _infile_, ' ' ) ;  * find blank ;&lt;BR /&gt;
_infile_ = substr( _infile_, num_end ) ; * take rest of line ;&lt;BR /&gt;
file 'output.sas.txt' ;  &lt;BR /&gt;
put _infile_ ;&lt;BR /&gt;
run ; &lt;BR /&gt;
 &lt;BR /&gt;
rough but ready</description>
      <pubDate>Wed, 03 Nov 2010 19:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21497#M4558</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-11-03T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21498#M4559</link>
      <description>Thank you for sharing the magic! Not only removed the log numbers but also the SAS messages etc. In other words, the output file only keeps the codes I submitted. BTW, thanks for introducing me to the _infile_, and all the comments you added in to help out the beginner.</description>
      <pubDate>Thu, 04 Nov 2010 04:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21498#M4559</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-11-04T04:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21499#M4560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I stumbled upon this code, but was unable to get it to work.&amp;nbsp; I am guessing since 2010 the syntax has changed a bit.&amp;nbsp; In any case here is an update in case anyone needs to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; infile 'C:\FillMeIn\test.log';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; input @;; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if _infile_ ne ' '; * not blank ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if '0' &amp;lt; substr(_infile_,1,1) &amp;lt;= '9'; * begins with number ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; num_end = index(_infile_, ' '); * find blank ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; _infile_ = substr(_infile_, num_end); * take rest of line ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; file 'C:\FillMeIn\test_no_line_numerbers.log'; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; put _infile_;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2012 00:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21499#M4560</guid>
      <dc:creator>wkingc</dc:creator>
      <dc:date>2012-12-15T00:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21500#M4561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may also open your log file with a good programing editor like Notepad++, select the section that you want and use the command &lt;EM&gt;Delete line numbers or first word.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2012 00:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21500#M4561</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-12-15T00:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21501#M4562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 12:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/21501#M4562</guid>
      <dc:creator>jjl</dc:creator>
      <dc:date>2014-03-12T12:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove log numbers?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/473473#M71042</link>
      <description>That Alt+LftMouseClk was very sweet, many thx!!</description>
      <pubDate>Tue, 26 Jun 2018 16:51:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-log-numbers/m-p/473473#M71042</guid>
      <dc:creator>dknochen</dc:creator>
      <dc:date>2018-06-26T16:51:58Z</dc:date>
    </item>
  </channel>
</rss>

