<?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: Viewing log files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7075#M21</link>
    <description>is the -altlog equally protected from access by notepad or ie ?&lt;BR /&gt;
&lt;BR /&gt;
peterC</description>
    <pubDate>Thu, 21 Feb 2008 17:26:27 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-02-21T17:26:27Z</dc:date>
    <item>
      <title>Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7073#M19</link>
      <description>When running SAS interactively, you can see the developing log file in the log window.  When running SAS in batch on Unix, you can still watch the log with more or less or tail -f.  Is there some viewing tool in Windows that will let you watch the log file while a long SAS job is running?  Notepad and Wordpad don't work, because Windows won't allow the access.  Is there some way around this?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
On a side note.&lt;BR /&gt;
&lt;BR /&gt;
I like the new forums, but could we have one more = OS and Server related stuff/issues. A place where we can talk about the above kinds of things, shell scripted wrappers for SAS, scheduler products, z/OS JCL that can affect/help SAS, etc.

Message was edited by: Chuck</description>
      <pubDate>Thu, 21 Feb 2008 16:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7073#M19</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T16:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7074#M20</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Use PROC PRINTTO and PUT log to HTML. Then through IE you can watch logs online. I'm using it on every project.&lt;BR /&gt;
&lt;BR /&gt;
Matej&lt;BR /&gt;
&lt;BR /&gt;
Eg:&lt;BR /&gt;
&lt;BR /&gt;
/*&lt;BR /&gt;
PROGRAM:    PRINTTO.SAS&lt;BR /&gt;
Desc:       Routing log to specific directory.&lt;BR /&gt;
Date:       24.9.2004&lt;BR /&gt;
&lt;BR /&gt;
Created By:&lt;BR /&gt;
            Author:     Matej Komár&lt;BR /&gt;
            e-mail:     Matej.Komar@comma.sk&lt;BR /&gt;
            Company:    COMMA Consulting&lt;BR /&gt;
&lt;BR /&gt;
Inputs:		&lt;BR /&gt;
				_logPath - path to external log file.html&lt;BR /&gt;
				_jobID - Job ID&lt;BR /&gt;
				_jobName - Job Name&lt;BR /&gt;
*/&lt;BR /&gt;
%MACRO PRINTTO;&lt;BR /&gt;
	%LOCAL dt;&lt;BR /&gt;
	%LET dt = %sysFunC(dateTime(), DATETIME16.);&lt;BR /&gt;
	FILENAME L_PATH "&amp;amp;_logPath";&lt;BR /&gt;
	DATA _null_;&lt;BR /&gt;
		file l_path; &lt;BR /&gt;
		put "&lt;PRE&gt;";&lt;BR /&gt;
	RUN;&lt;BR /&gt;
	FILENAME L_PATH CLEAR;&lt;BR /&gt;
&lt;BR /&gt;
	PROC PRINTTO LOG = "&amp;amp;_logPath";&lt;BR /&gt;
	RUN;&lt;BR /&gt;
&lt;BR /&gt;
	%PUT NOTE: [CUBIS] Job &amp;amp;_jobID - &amp;amp;_jobName was started successfully at &amp;amp;dt;&lt;BR /&gt;
%MEND;&lt;BR /&gt;
/* Test macro&lt;BR /&gt;
%LET _logPath = c:\temp\aaa.html;&lt;BR /&gt;
%LET _jobName = mato;&lt;BR /&gt;
%LET _jobID = mato;&lt;BR /&gt;
%printTo;&lt;BR /&gt;
%printBack;&lt;BR /&gt;
*/&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Feb 2008 17:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7074#M20</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T17:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7075#M21</link>
      <description>is the -altlog equally protected from access by notepad or ie ?&lt;BR /&gt;
&lt;BR /&gt;
peterC</description>
      <pubDate>Thu, 21 Feb 2008 17:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7075#M21</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T17:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7076#M22</link>
      <description>I think no. You can open log(-altlog option) in notepad for sure.</description>
      <pubDate>Thu, 21 Feb 2008 18:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7076#M22</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T18:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7077#M23</link>
      <description>Boy do I feel dumb.&lt;BR /&gt;
&lt;BR /&gt;
I had gotten into the habit of using WordPad instead of NotePad because it manages line wrapping better, and because it can open bigger log files.&lt;BR /&gt;
&lt;BR /&gt;
NotePad can open a log file while the SAS job is running.&lt;BR /&gt;
So can Internet Explorer -- this one is new to me, never thought of trying it.&lt;BR /&gt;
&lt;BR /&gt;
Thanks matej&lt;BR /&gt;
&lt;BR /&gt;
So, let's continue this.  How do I get the log file to flush to disk faster so that I can better see the progress.  The remote job has completed a data step and is now running a proc sql -- I know because I can follow the dataset creations -- but the log file is still 0 kB and so shows nothing.&lt;BR /&gt;
&lt;BR /&gt;
By the way, I have already set -logparm "open=replace write=immediate rollover=session"

Message was edited by: Chuck</description>
      <pubDate>Thu, 21 Feb 2008 18:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7077#M23</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T18:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7078#M24</link>
      <description>The problem with using IE is that the formatting is all off.  All the text runs together.&lt;BR /&gt;
&lt;BR /&gt;
I see why you preloaded the file with &lt;PRE&gt;&lt;BR /&gt;
But, that is not an option in this case because the log file is specfied on the .. oh wait a minute.&lt;BR /&gt;
&lt;BR /&gt;
Ok, if I leave the name *.log but then "Open with ..." IE, all the formatting stays.&lt;BR /&gt;
&lt;BR /&gt;
Wahoo!&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
I think this will do the trick.&lt;BR /&gt;
&lt;BR /&gt;
p.s.&lt;BR /&gt;
Viewing the log file in IE is actually cleaner than in Wordpad, I like it much better, no line wrapping.

Message was edited by: Chuck&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Feb 2008 19:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7078#M24</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T19:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7079#M25</link>
      <description>I have root summary.html. Columns N, GROUP_ID, GROUP_NAME, JOB_ID(link to detail log for every job), JOB_NAME, START, END, STATUS(colored, green - finished, yellow - running etc). It is “matrix” of jobs to be processed. Summary.html has auto refresh after 10 second. I‘m drinking coffee and playing Solitaire and waiting for red color:-) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 21 Feb 2008 19:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7079#M25</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T19:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7080#M26</link>
      <description>Chuck,&lt;BR /&gt;
&lt;BR /&gt;
You could also add the Unix commands that you need to your Windows box.  There is freeware available that include more, less and tail (Google:  &lt;UNIX commands="" windows=""&gt;) or you could just buy the fancy version from MKS Toolkits.&lt;BR /&gt;
&lt;BR /&gt;
The 0K .log size problem that you mentioned earlier happens in Unix too.  SAS writes the log in blocks (and the block-size is system dependent, based on disk utilization), so what you see as the 'end' is not necessarily 'current.'&lt;BR /&gt;
&lt;BR /&gt;
Doc&lt;/UNIX&gt;</description>
      <pubDate>Thu, 21 Feb 2008 19:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7080#M26</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-02-21T19:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7081#M27</link>
      <description>While SAS usually "commits" log data to disk in "pages", you can bypass this behaviour with the undocumented option "-unbuflog".&lt;BR /&gt;
&lt;BR /&gt;
I use it for all my SAS sessions as a startup option, and along with -altlog makes a version of the log available and reasonably current.  It is certainly more current than running the job without the option, but may still sit a little behind the game.  Perhaps a Tech Support person could clarify.&lt;BR /&gt;
&lt;BR /&gt;
However, I first used it because with errorabend in your options, you could lose a session, and have an incomplete log file.  Very frustrating to run three hours, have the job abend and no log entry to tell you why it happened!!!&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Thu, 21 Feb 2008 20:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7081#M27</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T20:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7082#M28</link>
      <description>For some reason, -unbuflog is not working for me.</description>
      <pubDate>Thu, 21 Feb 2008 21:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7082#M28</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T21:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7083#M29</link>
      <description>Starting with the obvious: you have specified it as part of your start up, haven't you?  If you hadn't you'd have a log message saying it could only be defined at invocation.  Have you any message?  How do you know it isn't working?&lt;BR /&gt;
&lt;BR /&gt;
UnBufLog was introduced in Version 8, there was another command used for version 6.  I presume however you are working with SAS9.&lt;BR /&gt;
&lt;BR /&gt;
My expectation is that the step code would be echoed to the log as the step is compiled, notes from within the step as they are generated, and the summary afterwards.  Are you seeing behaviour other than this?&lt;BR /&gt;
&lt;BR /&gt;
I fear we are straying a little from the constraints of this forum and Tech Support may be needed to offer suggestions and make further tests.  Still, if this doesn't always work, I'd like to know so I can avoid a Frasier Crane moment when I suggest it to a new client.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Thu, 21 Feb 2008 23:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7083#M29</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-21T23:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7084#M30</link>
      <description>Yes, I put it directly on the command line statement.&lt;BR /&gt;
&lt;BR /&gt;
The reason I identified that it isn't working for me is that the log file didn't change from 0 kB any faster, and the first jump was to 476 kB well after having already performed some proc sql steps and some data steps (I know because the primary dataset had been created and there still was no log content).&lt;BR /&gt;
&lt;BR /&gt;
There is no need for me to pursue this further at this time.</description>
      <pubDate>Sun, 24 Feb 2008 01:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7084#M30</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-02-24T01:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7085#M31</link>
      <description>There's always something.&lt;BR /&gt;
&lt;BR /&gt;
To deal with some problems, I uninstalled my SAS and EG and re-installed it.&lt;BR /&gt;
Now IE won't open the log files, even with explicitly selecting "Open with ..."&lt;BR /&gt;
&lt;BR /&gt;
Any clues?</description>
      <pubDate>Thu, 03 Apr 2008 12:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7085#M31</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-03T12:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7086#M32</link>
      <description>is it the writing of the file or is it IE ?&lt;BR /&gt;
&lt;BR /&gt;
try opening it in windows notepad&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Thu, 03 Apr 2008 15:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7086#M32</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-03T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7087#M33</link>
      <description>Wordpad, notepad, word, EG, SAS all work fine.&lt;BR /&gt;
IE is "working" except to display the .log and .lst files.&lt;BR /&gt;
This only just broke with the re-install of SAS and SAS EG.</description>
      <pubDate>Thu, 03 Apr 2008 15:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-log-files/m-p/7087#M33</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-03T15:12:14Z</dc:date>
    </item>
  </channel>
</rss>

