<?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 saspy - Execute SAS from Python in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890575#M10566</link>
    <description>&lt;P&gt;Hi folks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a SAS code that makes some data transformation creating multiple tables on WORK library. The code works perfectly. The SAS code is something like below example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tmp;
  set seashelp.class;
run;

data tmp2;
  set tmp;
 ....;
run;

data tmp3;
  set tmp2;
 ....;
run;

data tmp4;
  set tmp3;
 ....;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We tried to execute the same code on Python, using the following code and tried to describe the last table created on it (all the tables are created on WORK libname) but an error appears. The error says that the table does not exists. If we tried to describe the first table created on WORK, appear without any problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;codigo = open('c:\xxxx\my_code.sas').read()

sas.submit(codigo)

table_sas = sas.sasdata("WORK", "TMP4")
table_sas.describe()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is any limitation of using WORK to process using saspy?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 14:54:44 GMT</pubDate>
    <dc:creator>MariaD</dc:creator>
    <dc:date>2023-08-23T14:54:44Z</dc:date>
    <item>
      <title>saspy - Execute SAS from Python</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890575#M10566</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a SAS code that makes some data transformation creating multiple tables on WORK library. The code works perfectly. The SAS code is something like below example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tmp;
  set seashelp.class;
run;

data tmp2;
  set tmp;
 ....;
run;

data tmp3;
  set tmp2;
 ....;
run;

data tmp4;
  set tmp3;
 ....;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We tried to execute the same code on Python, using the following code and tried to describe the last table created on it (all the tables are created on WORK libname) but an error appears. The error says that the table does not exists. If we tried to describe the first table created on WORK, appear without any problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;codigo = open('c:\xxxx\my_code.sas').read()

sas.submit(codigo)

table_sas = sas.sasdata("WORK", "TMP4")
table_sas.describe()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is any limitation of using WORK to process using saspy?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 14:54:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890575#M10566</guid>
      <dc:creator>MariaD</dc:creator>
      <dc:date>2023-08-23T14:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: saspy - Execute SAS from Python</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890709#M10567</link>
      <description>Can you try to run with the same code using work.tmp in stead of just tmp?&lt;BR /&gt;Does that resolve the issue?</description>
      <pubDate>Thu, 24 Aug 2023 09:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890709#M10567</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2023-08-24T09:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: saspy - Execute SAS from Python</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890753#M10568</link>
      <description>&lt;P&gt;Thanks! Added the WORK as indicated and now works fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 13:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/saspy-Execute-SAS-from-Python/m-p/890753#M10568</guid>
      <dc:creator>MariaD</dc:creator>
      <dc:date>2023-08-24T13:48:54Z</dc:date>
    </item>
  </channel>
</rss>

