<?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 view the SAS log file with over 4GB? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342882#M78636</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mylog;
infile '/sasuser/asapp/Job.log' truncover;
input line $200.;
lineno = _n_;
if index(line,'ERROR');
if _n_ ge 10000 then stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will scan through your log and find the ERROR lines (and only those). Since the line numbers are kept, you can then use those to extract excerpts (firstobs=, obs=) from the log.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 10:02:13 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-03-21T10:02:13Z</dc:date>
    <item>
      <title>How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340489#M77818</link>
      <description>&lt;P&gt;I'm unable to view the&amp;nbsp;SAS log file with over 4GB in&amp;nbsp;either notepad++ or SAS EG. I got the following message when I tried to open the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File is too big to be opened by notepad++&lt;BR /&gt;Job.log is too large to open inside of Enterprise Guide and will be opened externally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know there is a way to view the file or extract the file via UNIX commands but I would like to know whether there is any other way to view the high volume file apart from UNIX enviornment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340489#M77818</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-03-13T16:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340490#M77819</link>
      <description>&lt;P&gt;Why have you ended up with a 4gb log file? &amp;nbsp;Try turning certain options off (options nomlogic nomprint nosymbolgen), break the log out into concise parts - i.e. modularise your code and output. &amp;nbsp;It sounds to me like you dumping a whole database out to the log, or doing vasat amounts of macro processing with macro options enabled.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340490#M77819</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-13T16:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340493#M77821</link>
      <description>&lt;P&gt;If you have no control over the size of the log file, you could try reading the log into a SAS data set that contains just one variable.&amp;nbsp; Each line of the log becomes a separate observation.&amp;nbsp; Then view the SAS data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be well-advised to change the program to break the log file up into pieces.&amp;nbsp; Use PROC PRINTTO to determine which sections of the log become part of which output file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340493#M77821</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-13T17:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340529#M77831</link>
      <description>&lt;P&gt;A 4GB log file contains 4 billion characters. Assuming you can check 1000 characters per second, you would need 4 million seconds for this log, or roughly 1000 hours. So this file is useless for human consumption.&lt;/P&gt;
&lt;P&gt;I'd simply delete that file and rerun the process that wrote it, and take care to stop it as soon as it starts to write mountains of text, so you can review it as long as it has a reasonable size.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340529#M77831</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-13T18:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340662#M77889</link>
      <description>&lt;PRE&gt;
Data step ?


data _null_;
 infile '/home/xx.log';
 input;
 putlog _infile_;
 if _n_ lt 100 then stop;
run;



&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Mar 2017 05:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/340662#M77889</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-14T05:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342874#M78630</link>
      <description>&lt;P&gt;I tried the similar code, but it seems it didn't helped either. There is no difference in the log even if I change the number of iteration from 1000 to 10000 in the following SAS code. Appreciate your help here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code which I tried is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile '/sasuser/asapp/Job.log';
input;
putlog _infile_;
if _n_ lt 1000 then stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log file :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: The infile '/sasuser/asapp/Job.log' is:
      Filename=/sasuser/asapp/Job.log,
      Owner Name=asapp,Group Name=grp,
      Access Permission=-rwxrwxrwx,
      Last Modified=21Mar2017:20:19:05,
      File Size (bytes)=4516790

1                                                          The SAS System                               09:54 Monday, March 21, 2017
NOTE: 1 record was read from the infile '/sasuser/asapp/Job.log'.
      The minimum record length was 132.
      The maximum record length was 132.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds
      system cpu time     0.01 seconds
      memory              779.03k
      OS Memory           20652.00k&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 09:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342874#M78630</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-03-21T09:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342876#M78631</link>
      <description>&lt;P&gt;Ahem.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _n_ lt 1000 then stop;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;1 is smaller than 1000, so it stops there.&lt;/P&gt;
&lt;P&gt;Change to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _n_ ge 1000 then stop;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 09:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342876#M78631</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-21T09:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342878#M78633</link>
      <description>&lt;P&gt;Thank you for quick reply and it resolve the issue. Could you please tell me how&amp;nbsp;can we tweak the same code to look for the word 'ERROR:' in log file and if it is there, it have to print till that line in log window. So that I can easily find out the error message and can investigate the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that findw function is used to look for words, but I'm not sure how to utilize this function for this scenario.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 09:51:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342878#M78633</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-03-21T09:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to view the SAS log file with over 4GB?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342882#M78636</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mylog;
infile '/sasuser/asapp/Job.log' truncover;
input line $200.;
lineno = _n_;
if index(line,'ERROR');
if _n_ ge 10000 then stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will scan through your log and find the ERROR lines (and only those). Since the line numbers are kept, you can then use those to extract excerpts (firstobs=, obs=) from the log.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 10:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-view-the-SAS-log-file-with-over-4GB/m-p/342882#M78636</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-21T10:02:13Z</dc:date>
    </item>
  </channel>
</rss>

