<?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 homework in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776031#M246722</link>
    <description>yes, missing values. I do not put correct syntax for diff,</description>
    <pubDate>Sat, 23 Oct 2021 11:30:30 GMT</pubDate>
    <dc:creator>mary987</dc:creator>
    <dc:date>2021-10-23T11:30:30Z</dc:date>
    <item>
      <title>sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776026#M246717</link>
      <description>&lt;P&gt;FOR THE FOLLWING DATA SET AS AN EXAMPLE 001 01/12/85 002 12/24/96 003 11/24/96 004 9/11/07 005 7/1/08 006 01/12/85 007 12/24/16 008 11/24/06 009 9/11/17 010 7/1/18 ; *CALCULATE YEARS UNTIL 31th of DEC 2020 THEN FIND FREQUENCY FOR:; * LESS THAN 5 YEARS; * BETWEEN 5 AND 10 YEARS; * 10 YEARS AND ABOVE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I write this syntax but I receive error : no datalines or infile&lt;/P&gt;&lt;P&gt;DATA Example;&lt;BR /&gt;DOS="31DEC20"d;&lt;BR /&gt;NDAYS=INTCK("DAY",DOS,TODAY());&lt;BR /&gt;NWEEKS=INTCK("WEEK",DOS,TODAY());&lt;BR /&gt;MONTHS=MONTH(DOS);&lt;BR /&gt;YEAR=YEAR (DOS);&lt;BR /&gt;diff=yrdif (DOS,DOB);&lt;BR /&gt;input @1 ID $3.&lt;BR /&gt;@5 DOB mmddyy10.&lt;BR /&gt;datalines;&lt;BR /&gt;001 01/12/85&lt;BR /&gt;002 12/24/96&lt;BR /&gt;003 11/24/96&lt;BR /&gt;004 9/11/07&lt;BR /&gt;005 7/1/08&lt;BR /&gt;006 01/12/85&lt;BR /&gt;007 12/24/16&lt;BR /&gt;008 11/24/06&lt;BR /&gt;009 9/11/17&lt;BR /&gt;010 7/1/18&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;RUN;&lt;BR /&gt;PROC PRINT DATA=Example;&lt;BR /&gt;FORMAT DOS DATE9.;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 11:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776026#M246717</guid>
      <dc:creator>mary987</dc:creator>
      <dc:date>2021-10-23T11:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776027#M246718</link>
      <description>&lt;P&gt;Put a semicolon at the end of the INPUT statement&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;input @1 ID $3.&amp;nbsp;@5 DOB mmddyy10.&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 11:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776027#M246718</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-10-23T11:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776028#M246719</link>
      <description>&lt;P&gt;tnx.&lt;/P&gt;&lt;P&gt;i want to find diff from 31DEC20 this date and the dates that are in datalines, I run this code for diff it shows period (.) for all observations.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 11:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776028#M246719</guid>
      <dc:creator>mary987</dc:creator>
      <dc:date>2021-10-23T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776029#M246720</link>
      <description>&lt;P&gt;Yes. The order of statements matter. Ask yourself what information has been read when you compute the DIFF variable. Are all the values that you need available at that time? Or perhaps you need to move that statement somewhere else in your program?&amp;nbsp; Good luck!&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 11:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776029#M246720</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-10-23T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776030#M246721</link>
      <description>&lt;P&gt;BTW, the period (.) means "missing value".&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 11:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776030#M246721</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-10-23T11:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776031#M246722</link>
      <description>yes, missing values. I do not put correct syntax for diff,</description>
      <pubDate>Sat, 23 Oct 2021 11:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776031#M246722</guid>
      <dc:creator>mary987</dc:creator>
      <dc:date>2021-10-23T11:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: sas homework</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776033#M246723</link>
      <description>&lt;P&gt;Apart from the order of variables in the YRDIF function (which will cause negative values), the assignment statement is OK, but its place in the code is not. You need to put it where the value for DOB has been read by the INPUT statement.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 11:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-homework/m-p/776033#M246723</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-23T11:47:09Z</dc:date>
    </item>
  </channel>
</rss>

