<?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 Why does this simple do function create a null in the first row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783687#M249958</link>
    <description>&lt;P&gt;I am trying to get a list of the last day of each month for the last 6 months from a specific date.&lt;/P&gt;&lt;P&gt;Here is my code and it produces a blank for the first row and I'm not sure why.&lt;/P&gt;&lt;PRE&gt;data DateList;
	enddate= '30Sep2021'd;
	do i = -1 to -5 by -1;
	    output;
		date=intnx('month',enddate,i,'e');
	end;
	keep date;
	format date DDMMYY10.;
run;&lt;/PRE&gt;&lt;P&gt;Any help and explanation would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 02 Dec 2021 16:24:15 GMT</pubDate>
    <dc:creator>RikeshPunja</dc:creator>
    <dc:date>2021-12-02T16:24:15Z</dc:date>
    <item>
      <title>Why does this simple do function create a null in the first row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783687#M249958</link>
      <description>&lt;P&gt;I am trying to get a list of the last day of each month for the last 6 months from a specific date.&lt;/P&gt;&lt;P&gt;Here is my code and it produces a blank for the first row and I'm not sure why.&lt;/P&gt;&lt;PRE&gt;data DateList;
	enddate= '30Sep2021'd;
	do i = -1 to -5 by -1;
	    output;
		date=intnx('month',enddate,i,'e');
	end;
	keep date;
	format date DDMMYY10.;
run;&lt;/PRE&gt;&lt;P&gt;Any help and explanation would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 16:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783687#M249958</guid>
      <dc:creator>RikeshPunja</dc:creator>
      <dc:date>2021-12-02T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this simple do function create a null in the first row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783689#M249959</link>
      <description>&lt;P&gt;Since you don't assign any value to DATE (the only variable you are keeping) before you write the observation how could ever be anything other than missing?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DateList;
  enddate= '30Sep2021'd;
  do i = -1 to -5 by -1;
    date=intnx('month',enddate,i,'e');
    output;
  end;
  keep date;
  format date DDMMYY10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;PS Why would you display dates in a style that will confuse 50% of the world?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 16:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783689#M249959</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-02T16:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this simple do function create a null in the first row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783693#M249963</link>
      <description>&lt;P&gt;Thank you Tom, that has solved my question and feel slightly silly now.&lt;/P&gt;&lt;P&gt;I'm in the UK and we ready dates in this format so helps me whilst coding to see dates in this format to check the code is working appropriately.&lt;/P&gt;&lt;P&gt;Thank you again for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 16:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-this-simple-do-function-create-a-null-in-the-first-row/m-p/783693#M249963</guid>
      <dc:creator>RikeshPunja</dc:creator>
      <dc:date>2021-12-02T16:41:16Z</dc:date>
    </item>
  </channel>
</rss>

