<?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: sas linux redirecting log in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405874#M10764</link>
    <description>&lt;P&gt;You can make a copy of sasbatch.sh and adapt it so that it searches in specific directories for SAS codes and also puts the logs into specifc directories.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2017 06:03:26 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-10-20T06:03:26Z</dc:date>
    <item>
      <title>sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405865#M10762</link>
      <description>&lt;P&gt;we install sas 9.4 on linux server and its a stand alone server. we run batch job using below command,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/path/to/sasbatch.sh /home/userid/test.sas -log /home/userid&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we make alias "sas" for&amp;nbsp;&lt;SPAN&gt;/path/to/sasbatch.sh and now running program like,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;sas&amp;nbsp;/home/userid/test.sas -log /home/userid&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we still want to simplify it and wants to run using below command,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sas test.sas&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what changes needs to be done to avoid writing full path to program when run from home dir and where to make changes so that logs gets redirect to home dir itself?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 04:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405865#M10762</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-10-20T04:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405874#M10764</link>
      <description>&lt;P&gt;You can make a copy of sasbatch.sh and adapt it so that it searches in specific directories for SAS codes and also puts the logs into specifc directories.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 06:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405874#M10764</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-20T06:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405875#M10765</link>
      <description>&lt;P&gt;On the assumption that all SAS source code is in the user's home directory, you could also use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sas ~/test.sas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Drawback is that people will forget to include the "&amp;nbsp; &amp;nbsp;~/&amp;nbsp; &amp;nbsp;". But Kurt suggestion is a good one in that you can customize the script to make&amp;nbsp;it foolproof.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 06:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/405875#M10765</guid>
      <dc:creator>nhvdwalt</dc:creator>
      <dc:date>2017-10-20T06:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406170#M10797</link>
      <description>i am not quite sure what environment variable i need to add into that script so that &amp;lt;sas test.sas&amp;gt; from command line would be possible,</description>
      <pubDate>Fri, 20 Oct 2017 21:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406170#M10797</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-10-20T21:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406214#M10799</link>
      <description>&lt;P&gt;If you can use an environment variable at all depends on where your SAS codes are stored.&lt;/P&gt;
&lt;P&gt;If they are always found in a specific subdirectory of a user's home, you can use $HOME as a starting point.&lt;/P&gt;
&lt;P&gt;If they are in a directory where each user has a subdirectory, you could use /sas_codes/$USER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The executable that you want to use as "sas" (be it the SAS binary, or an alias for a script) needs to be in a directory contained in your system PATH. Otherwise xou will have to use the absolute path whenever you call it.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2017 06:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406214#M10799</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-21T06:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406580#M10810</link>
      <description>I tried to updating some file thinking it needs to be updated, &lt;BR /&gt;&lt;BR /&gt;now I have PATH environment variable pointing to /home/utils (under /home, other users IDs are located).  Updated my .bash_profile + sasenv_local file + @ /etc/profile. Also have alias SAS pointing to =/path/to/sasbatch.sh. &lt;BR /&gt;home dir has all sas code file and from where I am trying running it. &lt;BR /&gt;&lt;BR /&gt;HOME environment variable pointing to -&amp;gt; /home/myid&lt;BR /&gt;&lt;BR /&gt;but still when I run command, &lt;BR /&gt;&lt;BR /&gt;sas test.sas &lt;BR /&gt;&lt;BR /&gt;following error message pop up, &lt;BR /&gt;&lt;BR /&gt;ERROR: Invalid file, /path-to/Lev1/SASApp/test.sas.&lt;BR /&gt;&lt;BR /&gt;so it still looking for code file under .../SASApp/. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Oct 2017 15:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406580#M10810</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-10-23T15:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406700#M10815</link>
      <description>&lt;P&gt;SAS is probably being invoked from&amp;nbsp;&lt;SPAN&gt;/path-to/Lev1/SASApp/, hence why it's looking for the code there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try&amp;nbsp;changing the directory to the directory containing the code first, then invoked SAS. Something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;cd /my_code_directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sas test.sas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 18:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406700#M10815</guid>
      <dc:creator>nhvdwalt</dc:creator>
      <dc:date>2017-10-23T18:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: sas linux redirecting log</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406728#M10819</link>
      <description>thanks i provided sas alias value to /path-to/sasfoundaiton/sas and now can execute job from home dir as -&amp;gt; sas test.sas.&lt;BR /&gt;&lt;BR /&gt;Appreciate all for your response. Thanks-</description>
      <pubDate>Mon, 23 Oct 2017 19:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/sas-linux-redirecting-log/m-p/406728#M10819</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2017-10-23T19:49:50Z</dc:date>
    </item>
  </channel>
</rss>

