<?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: Error in CAS runCode Action in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394999#M113</link>
    <description>&lt;P&gt;Please start a new thread with the question on the REST API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2017 06:27:44 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2017-09-12T06:27:44Z</dc:date>
    <item>
      <title>Error in CAS runCode Action</title>
      <link>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394457#M110</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello,&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;I have an issue with runCode Action and save Action.&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;1st one is the runCode Action. I submitted the following code, and cart is a cas table in a caslib called "MYCASLIB3".&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc cas;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;datastep.runCode submit / &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;code = &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"data cart;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;length id 8 name $100 units 8 price 8;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;id=1000;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name='iphone5s';&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;units=1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;price=4300;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;run;"; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;quit;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;I should have only 1 row in the output, while I got 8 rows. No idea why it is 8 rows.&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;I also tried other codes like output statement, or "data cart;set work.cart;run;" every time I got 8 rows*the row I am supposed to have.&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;2st thing is when I used the save action. My save action is like this("proc cas" omitted):&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;table.save /&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; table="cart"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; caslib="MYCASLIB3"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; name="cart.sashdat"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; replace=true;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; run;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;I found I cannot save the cart table into my cart.sashdat because I load the table from cart.sashdat and then fetched the table again and I still got the previous records. I also tried table={name="cart",caslib="MYCASLIB3"} and it still does not work.&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sat, 09 Sep 2017 17:51:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394457#M110</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-09-09T17:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in CAS runCode Action</title>
      <link>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394719#M111</link>
      <description>&lt;P&gt;Have a look at the &lt;A href="http://go.documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.11&amp;amp;docsetId=caspg&amp;amp;docsetTarget=cas-datastep-runcode.htm&amp;amp;locale=en" target="_self"&gt;dataStep.runCode action&lt;/A&gt;, if you are not reading from any table, the code gets execute on each node, this is why you get the 8 output rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can specify the SINGLE="NOINPUT" to run the code only one node&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;datastep.runCode submit  status=rc /
  
   single="noinput" code=sasCode
   ;
 print rc;&lt;/PRE&gt;
&lt;P&gt;See also&amp;nbsp;&lt;A href="http://go.documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.11&amp;amp;docsetId=casdspgm&amp;amp;docsetTarget=p1uvl8z1s51y54n1w3qy48ltyi5n.htm&amp;amp;locale=en" target="_self"&gt;DATA Step Processing Modes&lt;/A&gt; for more information.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394719#M111</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-09-11T15:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error in CAS runCode Action</title>
      <link>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394888#M112</link>
      <description>&lt;P&gt;Thank you, it works now. May I ask if you know about CAS REST API? I got another issue about the api when I ran fetch action&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 20:30:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394888#M112</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-09-11T20:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error in CAS runCode Action</title>
      <link>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394999#M113</link>
      <description>&lt;P&gt;Please start a new thread with the question on the REST API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 06:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/394999#M113</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-09-12T06:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in CAS runCode Action</title>
      <link>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/395260#M114</link>
      <description>&lt;P&gt;Thank you I started one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/About-SAS-Viya/Save-action-does-not-work-by-REST-api/m-p/395259#M73" target="_blank"&gt;https://communities.sas.com/t5/About-SAS-Viya/Save-action-does-not-work-by-REST-api/m-p/395259#M73&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 19:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Error-in-CAS-runCode-Action/m-p/395260#M114</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-09-12T19:53:44Z</dc:date>
    </item>
  </channel>
</rss>

