<?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: How to skip a month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135902#M27568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! It works.&lt;/P&gt;&lt;P&gt;In my case, '=' should not be added before &amp;amp;J, so in the HAVING condition, count should be &amp;amp;J-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Mar 2014 22:24:40 GMT</pubDate>
    <dc:creator>ZZB</dc:creator>
    <dc:date>2014-03-06T22:24:40Z</dc:date>
    <item>
      <title>How to skip a month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135899#M27565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table umd &lt;/P&gt;&lt;P&gt;as select distinct a.permno, a.date, a.prc, exp(sum(log(1+b.ret)))-1 as cum_return&lt;/P&gt;&lt;P&gt;from crspmom6(keep=permno date) as a, crspmom6 as b&lt;/P&gt;&lt;P&gt;where a.permno=b.permno and &lt;SPAN style="color: #ff0000;"&gt;0&amp;lt;=intck('month', b.date, a.date)&amp;lt;&amp;amp;J&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;group by a.permno, a.date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;having count(b.ret)=&amp;amp;J;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to change red words to skip one month, that is, skip the month between time t and t-1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 21:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135899#M27565</guid>
      <dc:creator>ZZB</dc:creator>
      <dc:date>2014-03-06T21:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip a month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135900#M27566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not 100% sure what you want, because the question isn't clear and how you're incrementing &amp;amp;J isn't presented. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;0&amp;lt;=intck('month', b.date, a.date)&amp;lt;&amp;amp;J+1? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 21:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135900#M27566</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-06T21:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip a month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135901#M27567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The two uses of &amp;amp;J do not seem to be related. The first refers to a number of months, the second, to a number of records...&lt;/P&gt;&lt;P&gt;WHERE condition only: Remove the "=" sign from the condition to exclude the current month and add a "=" sign before &amp;amp;J to include the Jth month..&lt;/P&gt;&lt;P&gt;HAVING condition has no apparent relation with your question...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 21:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135901#M27567</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-03-06T21:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip a month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135902#M27568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! It works.&lt;/P&gt;&lt;P&gt;In my case, '=' should not be added before &amp;amp;J, so in the HAVING condition, count should be &amp;amp;J-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 22:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-a-month/m-p/135902#M27568</guid>
      <dc:creator>ZZB</dc:creator>
      <dc:date>2014-03-06T22:24:40Z</dc:date>
    </item>
  </channel>
</rss>

