<?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: Run python command with systask in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702572#M37759</link>
    <description>Is EG running locally to have the same access to the D drive? Or is it running on a server somewhere that D access may not be available?</description>
    <pubDate>Mon, 30 Nov 2020 17:25:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-11-30T17:25:00Z</dc:date>
    <item>
      <title>Run python command with systask</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702566#M37757</link>
      <description>&lt;P&gt;I am trying to execute a python script in SAS using the systask command. I am using the systask over the x command so I can get the error return code when there is a problem. I am able to get the desired results when I run the following in a command prompt:&lt;/P&gt;&lt;P&gt;d:temp\python\getdata.py -c 9999 -l 000 -start 11/01/2020 -base 9999-000.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the following in enterprise guide I get an error code of 1 and the python command does not execute:&lt;/P&gt;&lt;P&gt;systask command "d:\temp\python\getdata.py. -c 9999. -l&amp;nbsp; &amp;amp;location. -start &amp;amp;startdate. -base 9999-000"&lt;BR /&gt;wait&lt;BR /&gt;status=RC_getdataCSV&lt;BR /&gt;shell;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;if &amp;amp;RC_getdataCSV&amp;gt;0 or &amp;amp;sysrc&amp;gt;0 then do;&lt;BR /&gt;put 'ERROR Occurred Pulling data';&lt;BR /&gt;end;&lt;BR /&gt;else put 'NOTE: Run completed successfully';&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 16:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702566#M37757</guid>
      <dc:creator>atux</dc:creator>
      <dc:date>2020-11-30T16:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run python command with systask</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702572#M37759</link>
      <description>Is EG running locally to have the same access to the D drive? Or is it running on a server somewhere that D access may not be available?</description>
      <pubDate>Mon, 30 Nov 2020 17:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702572#M37759</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-30T17:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run python command with systask</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702574#M37760</link>
      <description>&lt;P&gt;Use PIPE.&amp;nbsp; You might not get an error code, but you can read the messages that the command sends to the console.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile "d:\temp\python\getdata.py. -c 9999. -l  &amp;amp;location. -start &amp;amp;startdate. -base 9999-000 2&amp;gt;&amp;amp;1" pipe ;
  input;
  put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;PS Do you really have a filename with two periods in it?&amp;nbsp; getdata.py. ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 17:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-python-command-with-systask/m-p/702574#M37760</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-11-30T17:30:07Z</dc:date>
    </item>
  </channel>
</rss>

