<?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: Is there a way to run .sh on SAS?? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617677#M19115</link>
    <description>&lt;P&gt;Thank you very much! It was what I wanted!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 05:03:36 GMT</pubDate>
    <dc:creator>gugukaka</dc:creator>
    <dc:date>2020-01-16T05:03:36Z</dc:date>
    <item>
      <title>Is there a way to run .sh on SAS??</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617645#M19100</link>
      <description>&lt;P&gt;In Linux, we created a shell that transfers server1 to server2. Is there a way to run .sh on SAS?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 02:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617645#M19100</guid>
      <dc:creator>gugukaka</dc:creator>
      <dc:date>2020-01-16T02:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to run .sh on SAS??</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617662#M19107</link>
      <description>&lt;P&gt;Yes, You can execute the shell script in SAS Session using XCMD option,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It might be disabled in your Workspace Server due to security concerns, so you might have to enable it,&amp;nbsp;&lt;BR /&gt;You can refer this link for more details about this command:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=hostunx&amp;amp;docsetTarget=n02699r064oqccn19vblte8xzr8m.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=hostunx&amp;amp;docsetTarget=n02699r064oqccn19vblte8xzr8m.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 03:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617662#M19107</guid>
      <dc:creator>Kalind_Patel</dc:creator>
      <dc:date>2020-01-16T03:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to run .sh on SAS??</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617666#M19108</link>
      <description>&lt;P&gt;Thank you for the previous answer. One more question,&lt;BR /&gt;Is there a way to macro x y values in SAS when running a shell on Linux, for example sh test.sh x y?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 04:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617666#M19108</guid>
      <dc:creator>gugukaka</dc:creator>
      <dc:date>2020-01-16T04:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to run .sh on SAS??</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617672#M19111</link>
      <description>&lt;P&gt;Use the macro variables to generate the command you pass to the shell the same way you would use the macro variables to generate any other SAS command you want to run.&lt;/P&gt;
&lt;P&gt;So if you want run the unix command&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;test.sh x y&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And you have two macro variables named, for example, arg1 and arg2, like so:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let arg1=x;
%let arg2=y;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you can generate that command like so:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;test.sh &amp;amp;arg1. &amp;amp;arg2.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Personally I prefer to use a pipe to run the operating system commands, since then the program and read back any messages the command might reply with.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile "test.sh &amp;amp;arg1. &amp;amp;arg2." pipe;
  input;
  put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jan 2020 04:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617672#M19111</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-16T04:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to run .sh on SAS??</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617677#M19115</link>
      <description>&lt;P&gt;Thank you very much! It was what I wanted!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 05:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-run-sh-on-SAS/m-p/617677#M19115</guid>
      <dc:creator>gugukaka</dc:creator>
      <dc:date>2020-01-16T05:03:36Z</dc:date>
    </item>
  </channel>
</rss>

