<?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 Add a serial number column to the data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-a-serial-number-column-to-the-data/m-p/704498#M215975</link>
    <description>&lt;P&gt;I have a dataset with 100k rows, I want to add a column with serai number from 1 to 100k, but I want to write the code which is dynamic i.e.it should work with a dataset of any size (for example 1000 rows, 5000 rows, etc)&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 18:20:34 GMT</pubDate>
    <dc:creator>Saurabh_Rana</dc:creator>
    <dc:date>2020-12-08T18:20:34Z</dc:date>
    <item>
      <title>Add a serial number column to the data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-serial-number-column-to-the-data/m-p/704498#M215975</link>
      <description>&lt;P&gt;I have a dataset with 100k rows, I want to add a column with serai number from 1 to 100k, but I want to write the code which is dynamic i.e.it should work with a dataset of any size (for example 1000 rows, 5000 rows, etc)&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-serial-number-column-to-the-data/m-p/704498#M215975</guid>
      <dc:creator>Saurabh_Rana</dc:creator>
      <dc:date>2020-12-08T18:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add a serial number column to the data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-serial-number-column-to-the-data/m-p/704500#M215976</link>
      <description>data want;&lt;BR /&gt;set have;&lt;BR /&gt;SerialNumber = _n_;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Use the automatic variable _n_ to add it easily in to your data set. You can also do it via a more manual counter if you need to count by groups or something. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/&lt;/A&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-serial-number-column-to-the-data/m-p/704500#M215976</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-08T18:24:09Z</dc:date>
    </item>
  </channel>
</rss>

