<?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: Negative age values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94097#M26657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott&lt;/P&gt;&lt;P&gt;Thank you very much for your prompt response. And YES I have just noticed that some years are being read incorrectly eg 1914 has been read as 2014 which of course would make the difference negative in fact it is only years less than 1919 that are been converted to 2000's and then have negative values.&amp;nbsp; Oh boy am I missing something really important here?&lt;/P&gt;&lt;P&gt;Gratefully appreciate your guidance.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ella&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Sep 2013 05:22:22 GMT</pubDate>
    <dc:creator>elladunn</dc:creator>
    <dc:date>2013-09-26T05:22:22Z</dc:date>
    <item>
      <title>Negative age values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94095#M26655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Hi people of the SAS procedures community.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;I am a v new student to SAS and feel caught in the&amp;nbsp; headlights while having my toenails pulled! I believe it gets better........&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Anyway after a few hours I need help, pls excuse if this is such a painfully basic question;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;STRONG&gt;Have date of birth(dob) and date of acceptance(doa) into a program.&amp;nbsp; Some of the patients were born before 1960 so I am getting negative values when I calculate their age at date of acceptance.&amp;nbsp;&amp;nbsp; Would be eternally grateful for any guidance.&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; Using&lt;BR /&gt; input dob mmddyy9. doa mmddyy9.&lt;BR /&gt; agea=yrdif(dob,doa,'AGE');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Yours in eternal indebtedness&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Ella&lt;BR /&gt; &lt;BR style="mso-special-character: line-break;" /&gt; &lt;BR style="mso-special-character: line-break;" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 04:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94095#M26655</guid>
      <dc:creator>elladunn</dc:creator>
      <dc:date>2013-09-26T04:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Negative age values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94096#M26656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ella,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome to the wonderful world of SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created the following to replicate what you are seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA HAVE;&lt;/P&gt;&lt;P&gt;FORMAT DOA DOB DATE9.;&lt;/P&gt;&lt;P&gt;INPUT DOA:DATE9. DOB:DATE9.;&lt;/P&gt;&lt;P&gt;DATALINES;&lt;/P&gt;&lt;P&gt;01JAN1994 01JAN1959&lt;/P&gt;&lt;P&gt;01JAN1994 01JAN1960&lt;/P&gt;&lt;P&gt;01JAN1994 01JAN1961&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA WANT;&lt;/P&gt;&lt;P&gt;SET HAVE;&lt;/P&gt;&lt;P&gt;AGEA=YRDIF(DOB,DOA,'AGE');&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results this achieves are what you would expect I suspect.&amp;nbsp; Is there a chance that the DOA is larger than the DOB in the circumstances where you have witnessed negative resutls?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you post an example of the data you are accessing it will assist us in helping you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 04:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94096#M26656</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-09-26T04:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Negative age values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94097#M26657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott&lt;/P&gt;&lt;P&gt;Thank you very much for your prompt response. And YES I have just noticed that some years are being read incorrectly eg 1914 has been read as 2014 which of course would make the difference negative in fact it is only years less than 1919 that are been converted to 2000's and then have negative values.&amp;nbsp; Oh boy am I missing something really important here?&lt;/P&gt;&lt;P&gt;Gratefully appreciate your guidance.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ella&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 05:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94097#M26657</guid>
      <dc:creator>elladunn</dc:creator>
      <dc:date>2013-09-26T05:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Negative age values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94098#M26658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following article explains the issue quite nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000197881.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000197881.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have any further questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 05:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94098#M26658</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-09-26T05:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Negative age values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94099#M26659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks soooooooooo much Scott, all sorted now, really appreciated the prompt and informative response.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ella&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 07:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94099#M26659</guid>
      <dc:creator>elladunn</dc:creator>
      <dc:date>2013-09-27T07:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Negative age values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94100#M26660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No worries Ella.&amp;nbsp; Glad that it helped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Sep 2013 09:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Negative-age-values/m-p/94100#M26660</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-09-28T09:08:00Z</dc:date>
    </item>
  </channel>
</rss>

