<?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 Can we run SAS program in Linux creating a shell script. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517446#M139899</link>
    <description>&lt;P&gt;To secure the code. Instead using SAS tool to execute the program.Can you please help if we can write a shell script and execute the program. I created a program as below&amp;nbsp;shell script and run in LINUX but it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;#!/usr/bin/sh&lt;BR /&gt;dtstamp =$(date +%Y.%m.%d_%H.%M.%S)&lt;BR /&gt;pgmname ="/SAS/Code/Infra/Application_Validation.sas"&lt;BR /&gt;logname = "/SAS/Code/Infra/Application_Val_$dtstamp.log"&lt;BR /&gt;/sas/SASHome2/x86/SASFoundation/9.4/sas $pgmname -log $logname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;user/SAS/Code/infra&amp;gt;sh program.sh&lt;BR /&gt;program.sh: line 2: dtstamp: command not found&lt;BR /&gt;program.sh: line 3: pgmname: command not found&lt;BR /&gt;logname: extra operand `='&lt;BR /&gt;Try `logname --help' for more information.&lt;BR /&gt;program.sh: line 5: /sas/SASHome2/x86/SASFoundation/9.4/sas: No such file or directory&lt;/P&gt;</description>
    <pubDate>Fri, 30 Nov 2018 12:54:35 GMT</pubDate>
    <dc:creator>radha009</dc:creator>
    <dc:date>2018-11-30T12:54:35Z</dc:date>
    <item>
      <title>Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517446#M139899</link>
      <description>&lt;P&gt;To secure the code. Instead using SAS tool to execute the program.Can you please help if we can write a shell script and execute the program. I created a program as below&amp;nbsp;shell script and run in LINUX but it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;#!/usr/bin/sh&lt;BR /&gt;dtstamp =$(date +%Y.%m.%d_%H.%M.%S)&lt;BR /&gt;pgmname ="/SAS/Code/Infra/Application_Validation.sas"&lt;BR /&gt;logname = "/SAS/Code/Infra/Application_Val_$dtstamp.log"&lt;BR /&gt;/sas/SASHome2/x86/SASFoundation/9.4/sas $pgmname -log $logname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;user/SAS/Code/infra&amp;gt;sh program.sh&lt;BR /&gt;program.sh: line 2: dtstamp: command not found&lt;BR /&gt;program.sh: line 3: pgmname: command not found&lt;BR /&gt;logname: extra operand `='&lt;BR /&gt;Try `logname --help' for more information.&lt;BR /&gt;program.sh: line 5: /sas/SASHome2/x86/SASFoundation/9.4/sas: No such file or directory&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 12:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517446#M139899</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-11-30T12:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517457#M139905</link>
      <description>&lt;PRE&gt;/*** must have only one line **/

/sas/SASFoundation/9.4/sas
-sysin /home/sas/xxxx.sas
-config /location/sas/sasv9.cfg
-noterminal
-unbuflog
-log "/location/sas/log/xxxx_%Y%m%d.log"
-logparm "rollover=auto open=append write=immediate"
-memsize 0
-sortsize 1G&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517457#M139905</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-11-30T13:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517458#M139906</link>
      <description>&lt;P&gt;Blanks are the natural separators in any shell scripting language, so you must be careful in their use.&lt;/P&gt;
&lt;P&gt;When setting an environment variable, the equal sign has to &lt;EM&gt;immediately&lt;/EM&gt; follow the variable name.&lt;/P&gt;
&lt;P&gt;This will fail:&lt;/P&gt;
&lt;PRE&gt;$ dtstamp =$(date +%Y.%m.%d_%H.%M.%S) &lt;/PRE&gt;
&lt;P&gt;while this will work:&lt;/P&gt;
&lt;PRE&gt;$ dtstamp=$(date +%Y.%m.%d_%H.%M.%S) 
$ echo $dtstamp
2018.11.30_14.35.08
&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517458#M139906</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-30T13:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517459#M139907</link>
      <description>&lt;P&gt;Oh yeah, and&lt;/P&gt;
&lt;PRE&gt;program.sh: line 5: /sas/SASHome2/x86/SASFoundation/9.4/sas: No such file or directory&lt;/PRE&gt;
&lt;P&gt;simply means you entered an incorrect path name to your SAS executable. Browse your file system for the correct location.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517459#M139907</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-30T13:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517460#M139908</link>
      <description>&lt;P&gt;And it's best to use a shell script that SAS has prepared for running batch programs. It's called sasbatch.sh and located in /sasconf/Lev1/SASApp/Batchserver. It will use the same configuration you find in your SASApp server in SAS Studio or EG.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517460#M139908</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-30T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517474#M139914</link>
      <description>&lt;P&gt;I am using windows SAS for creating programs. Can i copy the scripts to unix server and execute the program as the above script.&lt;/P&gt;&lt;P&gt;in SAS properties i have the same patch.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517474#M139914</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-11-30T14:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can we run SAS program in Linux creating a shell script.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517477#M139917</link>
      <description>&lt;P&gt;Very naturally, you cannot use Windows batch files as shell scripts on UNIX systems. That's why I suggest to use the sasbatch.sh provided by SAS in the BI Server environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I don't understand what you mean by&lt;/P&gt;
&lt;P&gt;"in SAS properties i have the same patch."&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:08:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-run-SAS-program-in-Linux-creating-a-shell-script/m-p/517477#M139917</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-30T14:08:31Z</dc:date>
    </item>
  </channel>
</rss>

