<?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: SAS CODE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179343#M265006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should put&lt;/P&gt;&lt;P&gt;intck(&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;in a variable (so sas doesn't have to calculate 3 times the same thing + it reads better)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fe.&lt;/P&gt;&lt;P&gt;var1 = intck(&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;if var1 &amp;gt; 1 then AgeAtAdmission = var1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;else&amp;nbsp; AgeDay = intck('day', ADMIT_DAT, Birth_Date2);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2014 08:27:49 GMT</pubDate>
    <dc:creator>BartDekeyser</dc:creator>
    <dc:date>2014-10-10T08:27:49Z</dc:date>
    <item>
      <title>SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179338#M265001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;Could you help me figure out why I am getting this note??? after using the following lines of code???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; Also can I use the code like this????&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; 872 if Admission=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; and intck(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,Birth_Date2,ADMIT_DATE1) gt &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; then AgeAtAdmission=intck(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,Birth_Date2,ADMIT_DATE1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; 873 if intck(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,Birth_Date2,ADMIT_DATE1) lt &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; then AGEDAY=ADMIT_DATE1-Birth_Date2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;65 at 873:4&amp;nbsp;&amp;nbsp;&amp;nbsp; 65 at 873:70&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;NOTE: There were 14178 observations read from the data set WORK.FINAL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 22:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179338#M265001</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-09T22:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179339#M265002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have missing values for some of either Birth_Date2, Admit_Date1 or both. Run Proc Freq on those variables and see how many of each.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 22:47:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179339#M265002</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-09T22:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179340#M265003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This note let&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif;"&gt; you know about the missing values that were created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example check this &lt;SPAN style="font-weight: bold; color: #555555; font-family: Arial; line-height: 1.5em;"&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/modules/missing.htm"&gt;4. Missing values in assignment statements&lt;/A&gt;&lt;/SPAN&gt; . It give you an example with details about this note.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 22:51:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179340#M265003</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-10-09T22:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179341#M265004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're only going to have an admit_date1 if someone has a value of 0 for admission then you have to account for that fact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question: why calculate two different variables for those above and below 1 year old when you could capture both with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat Birth_Date2 ADMIT_DATE1 date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format Birth_Date2 ADMIT_DATE1 date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Admission Birth_Date2 ADMIT_DATE1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if admission eq 0 then AgeAtAdmission=YRDIF(Birth_Date2,ADMIT_DATE1,'age');&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1 15apr1980 .&lt;/P&gt;&lt;P&gt;0 15apr1980 20jun1985&lt;/P&gt;&lt;P&gt;0 10jul2000 22aug2010&lt;/P&gt;&lt;P&gt;0 15may2010 15jun2010&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 23:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179341#M265004</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-10-09T23:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179342#M265005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;The sas code requires the input file to have the new variable(ageday) created if age is less than an year.&lt;/P&gt;&lt;P&gt;I now understand that the "note" is because of some missing dates....&lt;/P&gt;&lt;P&gt;Is there any better way to recode the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;872&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Admission=&lt;STRONG style="color: #008080; font-family: Courier New; font-size: 10pt;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; and intck(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1) gt &lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; then AgeAtAdmission=intck&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;873 if intck(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1) lt &lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; then AGEDAY=ADMIT_DATE1-Birth_Date2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 08:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179342#M265005</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-10T08:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179343#M265006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should put&lt;/P&gt;&lt;P&gt;intck(&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;in a variable (so sas doesn't have to calculate 3 times the same thing + it reads better)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fe.&lt;/P&gt;&lt;P&gt;var1 = intck(&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,Birth_Date2,ADMIT_DATE1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;if var1 &amp;gt; 1 then AgeAtAdmission = var1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;else&amp;nbsp; AgeDay = intck('day', ADMIT_DAT, Birth_Date2);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 08:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179343#M265006</guid>
      <dc:creator>BartDekeyser</dc:creator>
      <dc:date>2014-10-10T08:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179344#M265007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bart,&lt;/P&gt;&lt;P&gt;For helping me use the code efficiently.&lt;/P&gt;&lt;P&gt;I also wanted to know if the result would be the same both ways(with what u showed and what I have done prior)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 08:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179344#M265007</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-10T08:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS CODE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179345#M265008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is it :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt; informat Birth_Date2 Admit_date1 date9.;&lt;/P&gt;&lt;P&gt; format Birth_Date2 Admit_date1 date9.;&lt;/P&gt;&lt;P&gt;input Admission Birth_Date2 Admit_Date1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = intck('Year' , BirthDate2, Admit_Date1);&lt;/P&gt;&lt;P&gt;if Admission = 0 and var1 &amp;gt; 1 then AgeAtAdmission = var1;&lt;/P&gt;&lt;P&gt;else AgeDay = intck('day', BirthDate2,&amp;nbsp; Admit_date1);&lt;/P&gt;&lt;P&gt;drop var1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 15apr1980 .&lt;/P&gt;&lt;P&gt;0 15apr1980 20jun1985&lt;/P&gt;&lt;P&gt;0 10jul2000 22aug2010&lt;/P&gt;&lt;P&gt;0 15may2010 15jun2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 09:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-CODE/m-p/179345#M265008</guid>
      <dc:creator>BartDekeyser</dc:creator>
      <dc:date>2014-10-10T09:03:43Z</dc:date>
    </item>
  </channel>
</rss>

