<?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 help example error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67306#M19250</link>
    <description>Hi!&lt;BR /&gt;
&lt;BR /&gt;
That is really interesting. For me SAS shows missing data (as I figured out, it starts reading eddate from column 14 not 15). So it works if I specify:&lt;BR /&gt;
&lt;BR /&gt;
input Projid startdate date9.  @15 enddate date9.;&lt;BR /&gt;
&lt;BR /&gt;
It works also if informats are specified in such a way:&lt;BR /&gt;
&lt;BR /&gt;
informat  startdate date9. enddate date9.;&lt;BR /&gt;
input Projid startdate enddate;&lt;BR /&gt;
&lt;BR /&gt;
But I have no idea why it shows those wrong years for you.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: ieva</description>
    <pubDate>Mon, 29 Dec 2008 08:22:44 GMT</pubDate>
    <dc:creator>ieva</dc:creator>
    <dc:date>2008-12-29T08:22:44Z</dc:date>
    <item>
      <title>SAS help example error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67305#M19249</link>
      <description>&lt;B&gt;I was trying to run the following program found in SAS help:&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
data projects;&lt;BR /&gt;
options nodate pageno=1 linesize=80 pagesize=60;    &lt;BR /&gt;
   input Projid startdate date9. enddate date9.;&lt;BR /&gt;
   Duration=enddate-startdate;&lt;BR /&gt;
   datalines;&lt;BR /&gt;
398 17oct1997	02nov1997&lt;BR /&gt;
942 22jan1998	10mar1998&lt;BR /&gt;
167 15dec1999	15feb2000&lt;BR /&gt;
250 04jan2001	11jan2001&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=projects;&lt;BR /&gt;
   format startdate enddate date9.;&lt;BR /&gt;
      title 'Days Between Project Start and Project End';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;But in my output the enddates are:&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
                  02nov2001&lt;BR /&gt;
                 10mar2001&lt;BR /&gt;
                 15feb2002&lt;BR /&gt;
                 11jan2002&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;It seems that the system picked up the right day and month but not the year. And this only happens to the variable enddate but not the startdate.&lt;BR /&gt;
&lt;BR /&gt;
Can someone help me to figure out why this is happening?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;/B&gt;</description>
      <pubDate>Sat, 27 Dec 2008 20:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67305#M19249</guid>
      <dc:creator>Chichi</dc:creator>
      <dc:date>2008-12-27T20:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS help example error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67306#M19250</link>
      <description>Hi!&lt;BR /&gt;
&lt;BR /&gt;
That is really interesting. For me SAS shows missing data (as I figured out, it starts reading eddate from column 14 not 15). So it works if I specify:&lt;BR /&gt;
&lt;BR /&gt;
input Projid startdate date9.  @15 enddate date9.;&lt;BR /&gt;
&lt;BR /&gt;
It works also if informats are specified in such a way:&lt;BR /&gt;
&lt;BR /&gt;
informat  startdate date9. enddate date9.;&lt;BR /&gt;
input Projid startdate enddate;&lt;BR /&gt;
&lt;BR /&gt;
But I have no idea why it shows those wrong years for you.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: ieva</description>
      <pubDate>Mon, 29 Dec 2008 08:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67306#M19250</guid>
      <dc:creator>ieva</dc:creator>
      <dc:date>2008-12-29T08:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS help example error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67307#M19251</link>
      <description>Hi.,&lt;BR /&gt;
&lt;BR /&gt;
The Problem is[as u mentioned for variables startdate and enddate date9. informats, SAS will read from 10 column for Enddate and it is blank(null) so the values showing as missing data] space between the startdate and enddate.&lt;BR /&gt;
&lt;BR /&gt;
If u will mentioned as follows it works fine.&lt;BR /&gt;
&lt;BR /&gt;
17oct199712nov1997&lt;BR /&gt;
22jan199810mar1998&lt;BR /&gt;
15dec199915feb2000&lt;BR /&gt;
04jan200111jan2001</description>
      <pubDate>Tue, 30 Dec 2008 11:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-help-example-error/m-p/67307#M19251</guid>
      <dc:creator>venkatesh</dc:creator>
      <dc:date>2008-12-30T11:12:35Z</dc:date>
    </item>
  </channel>
</rss>

