<?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: number of observations in dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846854#M334790</link>
    <description>&lt;P&gt;Are you running in SAS or VIYA.&lt;/P&gt;
&lt;P&gt;Looks like perhaps you are using VIYA and it ran the data step in multiple threads which caused the RETAIN to not work as it would have in normal SAS processing where it would have processed the dataset in a single thread.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2022 16:32:11 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-11-29T16:32:11Z</dc:date>
    <item>
      <title>number of observations in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846799#M334752</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;
&lt;P&gt;i am trying to add a column where i have the number of rows, like 1,2,3.. However this is what i get.&lt;/P&gt;
&lt;P&gt;I used this script :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data casuser.X;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set CASUSER.Y;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;retain f 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;f++1;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aloou_0-1669730483799.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77809i4BC6DC7B328385CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aloou_0-1669730483799.png" alt="aloou_0-1669730483799.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846799#M334752</guid>
      <dc:creator>aloou</dc:creator>
      <dc:date>2022-11-29T14:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: number of observations in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846807#M334757</link>
      <description>&lt;P&gt;Two options:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data casuser.X;
set CASUSER.Y;
retain f 0;
f + 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data casuser.X;
set CASUSER.Y;
f = _n_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846807#M334757</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-29T14:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: number of observations in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846854#M334790</link>
      <description>&lt;P&gt;Are you running in SAS or VIYA.&lt;/P&gt;
&lt;P&gt;Looks like perhaps you are using VIYA and it ran the data step in multiple threads which caused the RETAIN to not work as it would have in normal SAS processing where it would have processed the dataset in a single thread.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 16:32:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-of-observations-in-dataset/m-p/846854#M334790</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-29T16:32:11Z</dc:date>
    </item>
  </channel>
</rss>

