<?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: Setting up ALTLOG in SASV9.cfg FIle in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479332#M123701</link>
    <description>An IDE is an Integrated Development Environement. See &lt;A href="https://en.m.wikipedia.org/wiki/Integrated_development_environment" target="_blank"&gt;https://en.m.wikipedia.org/wiki/Integrated_development_environment&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;So SAS Display Manager also known as “PC SAS” or “Windows SAS” is an IDE. Enterprise Guide and SAS Studio are also IDEs.&lt;BR /&gt;&lt;BR /&gt;—Q.&lt;BR /&gt;</description>
    <pubDate>Thu, 19 Jul 2018 01:13:42 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2018-07-19T01:13:42Z</dc:date>
    <item>
      <title>Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479172#M123641</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wondered if someone could help me, i want every Base SAS session to output their log to a location&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i use the following in the sasV9.cfg file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-ALTLOG "D:\SAS_Logs\%username%.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It correctly creates me a log with my current username in the location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However as there could be multiple sessions and i don't want them overwriting i wanted to add parameters such as date, time, host name however nothing seems to work inside the cfg file, Both SAS and Windows variables do not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-ALTLOG "D:\SAS_Logs\%username%_%Y_%m_%d_%H_%M.txt"&lt;/P&gt;&lt;P&gt;-ALTLOG "D:\SAS_Logs\%username%_%computername%_%date%_%time%.txt"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me is it possible to use the AltLog with additional parameters?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have made it work by using a .bat file to Launch the SAS application thus:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;@echo off&lt;BR /&gt;set dt=%date%&lt;BR /&gt;set newdate=%dt:~6,4%%dt:~3,2%%dt:~0,2%&lt;BR /&gt;set mytime=%time%&lt;BR /&gt;set mytime=%mytime::=%&lt;BR /&gt;set mytime=%mytime:.=_%&lt;BR /&gt;set stamp=%newdate%_%mytime%

echo %stamp%

"D:\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "D:\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg" -ALTLOG "D:\SAS_Logs\%username%_%computername%_%stamp%.log"&lt;/PRE&gt;&lt;P&gt;The above works but i would prefer it is native inside the Config File but if not i can use the above, just wondered if i am missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I tweaked my Batch a bit having read a few articles so I could insert Seconds/MS in to ensure uniqueness. Updated Code above&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 18:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479172#M123641</guid>
      <dc:creator>srapp88</dc:creator>
      <dc:date>2018-07-18T18:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479225#M123661</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/53057"&gt;@srapp88&lt;/a&gt;, I've used this in my config which is close to what you are looking for:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;-altlog "C:\temp\#l_#n_#Y-#m-#d_#H-#M_#v.log" 
-logparm "rollover=session"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The #v generates a unique identifier (on Windows the process id + a sequence number).&lt;/P&gt;
&lt;P&gt;You can see all the parameters in the&amp;nbsp;&lt;A href="http://go.documentation.sas.com/?docsetId=lesysoptsref&amp;amp;docsetTarget=p0fmptfnyvi1n6n148u0qu4h44a5.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1iukhfq8fhb8gn12dgabfozfd89" target="_self"&gt;LOGPARM doc&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 19:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479225#M123661</guid>
      <dc:creator>DaveHorne</dc:creator>
      <dc:date>2018-07-18T19:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479231#M123662</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/53057"&gt;@srapp88&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wondered if someone could help me, i want every Base SAS session to output their log to a location&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If i use the following in the sasV9.cfg file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-ALTLOG "D:\SAS_Logs\%username%.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It correctly creates me a log with my current username in the location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However as there could be multiple sessions and i don't want them overwriting i wanted to add parameters such as date, time, host name however nothing seems to work inside the cfg file, Both SAS and Windows variables do not work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A "outside-the-box" alternative to prevent logs from overwriting each other is to use PROC PRINTTO in each program, you can then specify a unique name in the program and then the logs don't overwrite.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This also has the benefit of allowing you to name the SASLOGs in a understandable fashion, instead of the username/node/year/month/day/hour/minute name on the SASLOG as suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100"&gt;@DaveHorne&lt;/a&gt;. For example, if you are working on Project ABC and executing code from a program named program1.sas, you could have the SASLOG named Project_ABC_program1.log instead of username/node/year/month/day/hour/minute naming. You could also append a date and time and unique Id in the name of the log if desired.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 20:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479231#M123662</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-18T20:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479273#M123671</link>
      <description>&lt;P&gt;Agree, the flexibility offered by PROC PRINTTO is nice.&amp;nbsp; You can use macros or whatever to find all the information you might want to use in the name (current program name, userid, date/time, guid, etc etc.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only downside is that when you redirect your log in an interactive session, you don't get to see it without jumping through hoops (like reading it back in).&amp;nbsp; I really wish you could specify ALTLOG on an options statement.&amp;nbsp; If you agree, I'm trolling for upvotes on my aging ballotware item:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Allow-ALTLOG-to-be-specified-on-OPTIONS-statement/idi-p/219628" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/Allow-ALTLOG-to-be-specified-on-OPTIONS-statement/idi-p/219628&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 20:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479273#M123671</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-07-18T20:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479298#M123681</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;The only downside is that when you redirect your log in an interactive session, you don't get to see it without jumping through hoops (like reading it back in).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't know what this means. Can you explain?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When I run PROC PRINTTO, I can look at the log while the program is running via any text editor.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 21:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479298#M123681</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-18T21:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479303#M123684</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;The only downside is that when you redirect your log in an interactive session, you don't get to see it without jumping through hoops (like reading it back in).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't know what this means. Can you explain?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When I run PROC PRINTTO, I can look at the log while the program is running via any text editor.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agree, when running a job and redirecting the log, you can look at it while it's running with an editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean in an interactive session where I want to see the log in the IDE.&amp;nbsp; Suppose I'm running an interactive session in DM SAS or EG or Studio.&amp;nbsp; I want to be able to run code and see the log displayed in the IDE, and also have the log written to a permanent file.&amp;nbsp; For that, I wish I could just use options ALTLOG... to start writing my log to a file.&amp;nbsp; If I used PROC PRINTTO to send it to a file, it doesn't get displayed in the IDE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So sometimes in EG I will hack something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mylog "c:\logs\mylog.log";

*redirect log to a file;
proc printto log=mylog new;
run;

*main code here;

proc printto log=log;  *reset;
run;

*write logfile back to the IDE log;

data _null_;
  infile mylog;
  input;
  put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jul 2018 21:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479303#M123684</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-07-18T21:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479306#M123686</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;wrote:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;I mean in an interactive session where I want to see the log in the IDE.&amp;nbsp; Suppose I'm running an interactive session in DM SAS or EG or Studio.&amp;nbsp; I want to be able to run code and see the log displayed in the IDE, and also have the log written to a permanent file.&amp;nbsp; For that, I wish I could just use options ALTLOG... to start writing my log to a file.&amp;nbsp; If I used PROC PRINTTO to send it to a file, it doesn't get displayed in the IDE.&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What does IDE mean?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 22:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479306#M123686</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-18T22:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479332#M123701</link>
      <description>An IDE is an Integrated Development Environement. See &lt;A href="https://en.m.wikipedia.org/wiki/Integrated_development_environment" target="_blank"&gt;https://en.m.wikipedia.org/wiki/Integrated_development_environment&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;So SAS Display Manager also known as “PC SAS” or “Windows SAS” is an IDE. Enterprise Guide and SAS Studio are also IDEs.&lt;BR /&gt;&lt;BR /&gt;—Q.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jul 2018 01:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479332#M123701</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-07-19T01:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479432#M123759</link>
      <description>&lt;P&gt;This is exactly what i need!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so what i was missing was the -logparm part as i had the AltLog but that never worked, adding Log Parm it is fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! I can now avoid having to use a batch script to Launch SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all for your responses &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 09:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/479432#M123759</guid>
      <dc:creator>srapp88</dc:creator>
      <dc:date>2018-07-19T09:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/505836#M135512</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100"&gt;@DaveHorne&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Hey Deve,&lt;BR /&gt;&lt;BR /&gt;I tried the two lines in sasv9_local.&lt;BR /&gt;But logs are generating with the special characters not with the timestamp.&lt;BR /&gt;&lt;BR /&gt;Please help me out.&lt;BR /&gt;Os : aix.&lt;BR /&gt;Sas version 9.3</description>
      <pubDate>Fri, 19 Oct 2018 05:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/505836#M135512</guid>
      <dc:creator>ruturaj72</dc:creator>
      <dc:date>2018-10-19T05:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up ALTLOG in SASV9.cfg FIle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/506426#M135766</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192556"&gt;@ruturaj72&lt;/a&gt;, I checked the 9.3 doc on &lt;A href="https://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p0fmptfnyvi1n6n148u0qu4h44a5.htm" target="_blank"&gt;LOGPARM &lt;/A&gt;and the options appear the same.&amp;nbsp; The only time I've seen the situation you describe is when I forget the ROLLOVER option.&amp;nbsp; If that looks ok then you may need to open a track with tech support.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 13:09:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-up-ALTLOG-in-SASV9-cfg-FIle/m-p/506426#M135766</guid>
      <dc:creator>DaveHorne</dc:creator>
      <dc:date>2018-10-22T13:09:10Z</dc:date>
    </item>
  </channel>
</rss>

