<?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: Sequencing Question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170584#M264211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The DOB values do have to be consecutive in the data.&amp;nbsp; I also have gender that I could use to make sure that there aren't two random people back to back that happen to have the same DOB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2014 15:34:31 GMT</pubDate>
    <dc:creator>brousseg</dc:creator>
    <dc:date>2014-04-07T15:34:31Z</dc:date>
    <item>
      <title>Sequencing Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170581#M264208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question in regards to sequencing in SAS.&amp;nbsp; I have a large dataset of dates of birth that I would like to assign unique identifiers to, since they did not come with one.&amp;nbsp; If there are two cells in a row that have the same date of birth, they are the same person and should have the same unique ID. Below is an example of what I would like my dataset to look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="139"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="75"&gt;DOB&lt;/TD&gt;&lt;TD width="64"&gt;ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;9/9/2000&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;9/9/2000&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;8/11/1993&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;7/7/1987&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;7/7/1987&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;7/7/1987&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;2/28/2001&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;2/28/2001&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;10/18/1967&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm just not sure how to sequence correctly in SAS so if a date of birth is equal directly after another date of birth, that they are assigned the same unique ID.&amp;nbsp; And if the date of birth is different, then a new unique ID is assigned.&amp;nbsp; Thank you for help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 14:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170581#M264208</guid>
      <dc:creator>brousseg</dc:creator>
      <dc:date>2014-04-07T14:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sequencing Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170582#M264209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The programming isn't difficult ... it might be as easy as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by DOB notsorted;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if first.DOB then ID + 1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining the problem is another story.&amp;nbsp; For example, do the DOB values have to be consecutive in the data for them to represent the same person?&amp;nbsp; (The sample solution assumes that they have to be consecutive.)&amp;nbsp; Do you have an additional variable you could use to make sure the matching DOB values are actually the same person?&amp;nbsp; It would be entirely possible for two consecutive people to have the same DOB.&amp;nbsp; Depending on what you mean by a "large" data set, it might be more or less likely that this will occur.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:06:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170582#M264209</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-04-07T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sequencing Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170583#M264210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could also use proc rank; by dob;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170583#M264210</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-07T15:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sequencing Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170584#M264211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The DOB values do have to be consecutive in the data.&amp;nbsp; I also have gender that I could use to make sure that there aren't two random people back to back that happen to have the same DOB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170584#M264211</guid>
      <dc:creator>brousseg</dc:creator>
      <dc:date>2014-04-07T15:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sequencing Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170585#M264212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case, you could use the program I posted with one change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by GENDER DOB notsorted;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would not need to sort your data first as long as consecutive matching records belong to the same person, and nonconsecutive records belong to different people.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 16:39:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170585#M264212</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-04-07T16:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sequencing Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170586#M264213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help, it is very much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 16:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sequencing-Question/m-p/170586#M264213</guid>
      <dc:creator>brousseg</dc:creator>
      <dc:date>2014-04-07T16:50:27Z</dc:date>
    </item>
  </channel>
</rss>

