<?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: While working with cas tables with sort alike operations, when Do I really need single=yes optio in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/While-working-with-cas-tables-with-sort-alike-operations-when-Do/m-p/962067#M2787</link>
    <description>&lt;P&gt;Hello ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use this option&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options MSGLEVEL=I ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to get full info in the LOG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The ADDROWID data set option maintains the order of your data when executing a DATA step in SAS® Cloud Analytic Services (CAS)&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class="post-meta cf"&gt;&lt;SPAN class="posted-by"&gt;By&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="reviewer"&gt;&lt;A title="Posts by Kevin Russell" href="https://blogs.sas.com/content/author/kevinrussell/" target="_blank" rel="author noopener"&gt;Kevin Russell&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://blogs.sas.com/content/sgf/" target="_blank" rel="noopener"&gt;SAS Users&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="posted-on"&gt;&lt;SPAN class="dtreviewed"&gt;&lt;TIME class="value-title" title="2022-08-17" datetime="2022-08-17T09:03:58-04:00"&gt;August 17, 2022&lt;BR /&gt;&lt;/TIME&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="cats"&gt;Topics |&lt;SPAN&gt;&amp;nbsp;Programming Tips&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2022/08/17/the-addrowid-data-set-option-maintains-the-order-of-your-data-when-executing-a-data-step-in-sas-cloud-analytic-services-cas/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sgf/2022/08/17/the-addrowid-data-set-option-maintains-the-order-of-your-data-when-executing-a-data-step-in-sas-cloud-analytic-services-cas/&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="post-meta cf"&gt;&lt;SPAN class="cats"&gt;&lt;SPAN class="cats"&gt;&lt;SPAN&gt;The ADDROWID option is not existing in SAS Viya 3.5. You need SAS Viya 4 for that one.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;For completeness , I add this link :&lt;/DIV&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n0aj01kzztrvbsn1dkum4us3sgqv.htm" target="_blank" rel="noopener"&gt;SAS Help Center: SAS CALL Routines and Functions That Are Not Supported in CAS&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ciao,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 10:53:23 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2025-03-18T10:53:23Z</dc:date>
    <item>
      <title>While working with cas tables with sort alike operations, when Do I really need single=yes option?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/While-working-with-cas-tables-with-sort-alike-operations-when-Do/m-p/962020#M2786</link>
      <description>&lt;P&gt;I wonder in which cases related to first, last, lag, dif... operations I do need to run the data step in single mode to get the right results.&lt;/P&gt;
&lt;P&gt;Whether I comment or not the single thread option the resulting table is correct.&lt;/P&gt;
&lt;P&gt;Does it depend on the size of the table if cas runs in multimode?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CASUSER.TESTA_DUP2;
/*  / SESSREF='mysession' single=yes; */
   set PUBLIC.WET_PX10_MAN_NOM_SL;
by timestamp sample_id;
if first.timestamp then _position_ = 0;
_position_+1;
run;

proc cas;
source MPG_toyota;
		create table CASUSER.TESTA_DUP2{options replace=true} as 
			select a.*, _frequency_
               from CASUSER.TESTA_DUP2 a left join 
				(select timestamp, max(_position_) as _frequency_ from CASUSER.TESTA_DUP2 group by 1)  b 
			on a.timestamp=b.timestamp  ;
endsource;
fedSQL.execDirect / query=MPG_toyota;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Mar 2025 17:40:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/While-working-with-cas-tables-with-sort-alike-operations-when-Do/m-p/962020#M2786</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-03-17T17:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: While working with cas tables with sort alike operations, when Do I really need single=yes optio</title>
      <link>https://communities.sas.com/t5/SAS-Viya/While-working-with-cas-tables-with-sort-alike-operations-when-Do/m-p/962067#M2787</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use this option&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options MSGLEVEL=I ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to get full info in the LOG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The ADDROWID data set option maintains the order of your data when executing a DATA step in SAS® Cloud Analytic Services (CAS)&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class="post-meta cf"&gt;&lt;SPAN class="posted-by"&gt;By&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="reviewer"&gt;&lt;A title="Posts by Kevin Russell" href="https://blogs.sas.com/content/author/kevinrussell/" target="_blank" rel="author noopener"&gt;Kevin Russell&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://blogs.sas.com/content/sgf/" target="_blank" rel="noopener"&gt;SAS Users&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="posted-on"&gt;&lt;SPAN class="dtreviewed"&gt;&lt;TIME class="value-title" title="2022-08-17" datetime="2022-08-17T09:03:58-04:00"&gt;August 17, 2022&lt;BR /&gt;&lt;/TIME&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="cats"&gt;Topics |&lt;SPAN&gt;&amp;nbsp;Programming Tips&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2022/08/17/the-addrowid-data-set-option-maintains-the-order-of-your-data-when-executing-a-data-step-in-sas-cloud-analytic-services-cas/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sgf/2022/08/17/the-addrowid-data-set-option-maintains-the-order-of-your-data-when-executing-a-data-step-in-sas-cloud-analytic-services-cas/&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="post-meta cf"&gt;&lt;SPAN class="cats"&gt;&lt;SPAN class="cats"&gt;&lt;SPAN&gt;The ADDROWID option is not existing in SAS Viya 3.5. You need SAS Viya 4 for that one.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;For completeness , I add this link :&lt;/DIV&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n0aj01kzztrvbsn1dkum4us3sgqv.htm" target="_blank" rel="noopener"&gt;SAS Help Center: SAS CALL Routines and Functions That Are Not Supported in CAS&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ciao,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 10:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/While-working-with-cas-tables-with-sort-alike-operations-when-Do/m-p/962067#M2787</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2025-03-18T10:53:23Z</dc:date>
    </item>
  </channel>
</rss>

