<?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: date 1111-11-11 in sas in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143219#M2295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably the easiest would be to have a pass through query in DB2 that creates a flag variable for the 1111-11-11 condition and then import the result of that query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 14:55:20 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-10-28T14:55:20Z</dc:date>
    <item>
      <title>date 1111-11-11 in sas</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143216#M2292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to generate an xl report from DB2 using SAS. Below is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create mySasTbl as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select DateField&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; This field can hold values 1111-11-11 or NULL or valid date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; from db2table1&lt;/P&gt;&lt;P&gt; where cond1 = true;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc print data=mySasTbl&amp;nbsp; label noobs;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS treats the date 1111-11-11 as missing field and generates the report with dot(.). The report should get generated with any kind of value in DateField (1111-11-11 or NULL or valid date) as in DB2 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion would be of great help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 14:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143216#M2292</guid>
      <dc:creator>SujathaBalachandran</dc:creator>
      <dc:date>2014-10-27T14:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: date 1111-11-11 in sas</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143217#M2293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the variable DateField in mySasTbl supposed to be a SAS date variable? Generally SAS treats dates before 1582 as invalid as the Gregorian calendar (current) wasn't in general use before then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And since you state "or valid date" then the value 1111-11-11 is some special value and isn't an actual date either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be tempted to select ID values from the source data with that value and then update your mySasTbl with a special missing value so you can identify those records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 16:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143217#M2293</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-27T16:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: date 1111-11-11 in sas</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143218#M2294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Null variables in DB2 and 1111-11-11 in db2 are converted to dot (.) by SAS. So I would need some measure in SAS to differentiate the NULL value in DB2 and 1111-11-11 in DB2, that I select from the DB2 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are there any methods to differentiate these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 14:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143218#M2294</guid>
      <dc:creator>SujathaBalachandran</dc:creator>
      <dc:date>2014-10-28T14:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: date 1111-11-11 in sas</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143219#M2295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably the easiest would be to have a pass through query in DB2 that creates a flag variable for the 1111-11-11 condition and then import the result of that query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 14:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-1111-11-11-in-sas/m-p/143219#M2295</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-28T14:55:20Z</dc:date>
    </item>
  </channel>
</rss>

