<?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 save log if I run sas program in batch mode? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862062#M340500</link>
    <description>&lt;P&gt;This &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/lepg/p119kau8rt2ebgn1bzaipafu6jp3.htm" target="_blank" rel="noopener"&gt;doc&lt;/A&gt; should help you. It is best practice to specify log locations using the -LOG option when invoking your batch SAS job&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2023 02:35:08 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2023-03-03T02:35:08Z</dc:date>
    <item>
      <title>how to save log if I run sas program in batch mode?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862057#M340495</link>
      <description>I’m new to sas. I need to run my sas program in batch mode on Putty, how do I archive the log to another location? My I have an example of sas codes.&lt;BR /&gt;I’m using:&lt;BR /&gt;&lt;BR /&gt;nohup /opt/sas/config/Lev1/SASApp/sas programname.sas &amp;amp;&lt;BR /&gt;&lt;BR /&gt;is that correct？</description>
      <pubDate>Fri, 03 Mar 2023 01:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862057#M340495</guid>
      <dc:creator>qc1</dc:creator>
      <dc:date>2023-03-03T01:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to save log if I run sas program in batch mode?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862062#M340500</link>
      <description>&lt;P&gt;This &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/lepg/p119kau8rt2ebgn1bzaipafu6jp3.htm" target="_blank" rel="noopener"&gt;doc&lt;/A&gt; should help you. It is best practice to specify log locations using the -LOG option when invoking your batch SAS job&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 02:35:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862062#M340500</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-03-03T02:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to save log if I run sas program in batch mode?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862063#M340501</link>
      <description>&lt;P&gt;That should create a file named programname.log (and programname.lst for the "listing" output as they now want to call it) in the current directory.&lt;/P&gt;
&lt;P&gt;If you want the files written somewhere else using the -log and -print command line options.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 02:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862063#M340501</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-03-03T02:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to save log if I run sas program in batch mode?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862064#M340502</link>
      <description>&lt;P&gt;Below how this looks like in the environment I'm currently working in.&lt;/P&gt;
&lt;PRE&gt;sso/biconfig/940/Lev1/SASApp/BatchServer/sasbatch.sh -log .../logs/program_  -batch -noterminal -logparm "rollover=session"  -sysin .../program.sas&lt;/PRE&gt;
&lt;P&gt;Depending on the config in your environment you will eventually have to add some specific directives to create a log name with a date portion. How to documented &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/p0fmptfnyvi1n6n148u0qu4h44a5.htm" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding the destination and name for printed output explicitly is also not a bad idea. Would be -print ..../program.lst&amp;nbsp; ....and you could also use some time directives there to not just overwrite your listing output.&amp;nbsp; ....or if you don't want any listing output then point to /dev/null&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 02:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862064#M340502</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-03-03T02:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to save log if I run sas program in batch mode?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862080#M340512</link>
      <description>&lt;P&gt;Make it a habit to use only fully qualified path names in OS commands, especially when writing shell scripts.&lt;/P&gt;
&lt;P&gt;This makes the commandline resilient against any changes in current working directory, and you will often need to redirect stuff like log files because the script won't have write permission on the CWD, and you don't want to clutter up your program directory with logs.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 07:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-save-log-if-I-run-sas-program-in-batch-mode/m-p/862080#M340512</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-03T07:45:39Z</dc:date>
    </item>
  </channel>
</rss>

