<?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: IDing on one column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334872#M75666</link>
    <description>&lt;P&gt;Post test data in the form of a datastep, I am not here to type that in. &amp;nbsp;So this code is just and example:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  by name;
  retain id;
  id=ifn(first.name1,id+1);
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Feb 2017 10:25:26 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-02-22T10:25:26Z</dc:date>
    <item>
      <title>IDing on one column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334871#M75665</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table A with several variables.&lt;/P&gt;&lt;P&gt;Among all these variables I have one variable called "name". Data are sorted by this variable.&lt;/P&gt;&lt;P&gt;I can have several rows for one value of the column "name".&lt;/P&gt;&lt;P&gt;I would like to distinct them by adding an index column named ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of my table A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;... name ...
... A ...
... B ...
... B ...
... D ...
... E ...
... E ...
... E ...
...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table I need is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;... name ID ...
... A 1 ...
... B 1 ...
... B 2 ...
... D 1 ...
... E 1 ...
... E 2 ...
... E 3 ...
...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how I can do it?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 10:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334871#M75665</guid>
      <dc:creator>Planck</dc:creator>
      <dc:date>2017-02-22T10:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: IDing on one column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334872#M75666</link>
      <description>&lt;P&gt;Post test data in the form of a datastep, I am not here to type that in. &amp;nbsp;So this code is just and example:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  by name;
  retain id;
  id=ifn(first.name1,id+1);
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 10:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334872#M75666</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-22T10:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: IDing on one column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334873#M75667</link>
      <description>&lt;P&gt;Thanks for the answer.&lt;/P&gt;&lt;P&gt;Small mistake I correct:&lt;/P&gt;&lt;PRE&gt;data want;
  set have;
  by name;
  retain id;
  id=ifn(first.name,1,id+1);
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 10:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IDing-on-one-column/m-p/334873#M75667</guid>
      <dc:creator>Planck</dc:creator>
      <dc:date>2017-02-22T10:33:40Z</dc:date>
    </item>
  </channel>
</rss>

