<?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 finding the first quarterly reporting date after a transaction date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746865#M234350</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A have a dataset with a list of transaction dates for different companies.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	transactiondate month lpermno gvkey fyear
1	04/29/1998	4	42455	005697	1998
2	04/30/1998	4	42455	005697	1998
3	05/05/1998	5	42455	005697	1998
4	05/06/1998	5	42455	005697	1998
5	05/07/1998	5	42455	005697	1998
6	03/01/1999	3	42455	005697	1999&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to determine the first quarterly reporting date after the transactiondate. I have a separate dataset that shows this information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;gvkey fyearq fqtr(quarter) rdq(quarterly reporting date)&lt;BR /&gt;23	001000	1971	3	19711109
24	001000	1971	4	19720406
25	001000	1972	1	19720420
26	001000	1972	2	19720724
27	001000	1972	3	19721017
28	001000	1972	4	19730215&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ideally I want the first quarterly reporting date after the transaction date as a column in the first dataset.&lt;/P&gt;&lt;P&gt;I am thinking that I match on gvkey and fyear=fyearq and someone delete the observations in the second dataset that has a rdq before the transaction date and then retain the first rdq after the transaction date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 19:08:19 GMT</pubDate>
    <dc:creator>Mistletoad</dc:creator>
    <dc:date>2021-06-09T19:08:19Z</dc:date>
    <item>
      <title>finding the first quarterly reporting date after a transaction date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746865#M234350</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A have a dataset with a list of transaction dates for different companies.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	transactiondate month lpermno gvkey fyear
1	04/29/1998	4	42455	005697	1998
2	04/30/1998	4	42455	005697	1998
3	05/05/1998	5	42455	005697	1998
4	05/06/1998	5	42455	005697	1998
5	05/07/1998	5	42455	005697	1998
6	03/01/1999	3	42455	005697	1999&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to determine the first quarterly reporting date after the transactiondate. I have a separate dataset that shows this information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;gvkey fyearq fqtr(quarter) rdq(quarterly reporting date)&lt;BR /&gt;23	001000	1971	3	19711109
24	001000	1971	4	19720406
25	001000	1972	1	19720420
26	001000	1972	2	19720724
27	001000	1972	3	19721017
28	001000	1972	4	19730215&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ideally I want the first quarterly reporting date after the transaction date as a column in the first dataset.&lt;/P&gt;&lt;P&gt;I am thinking that I match on gvkey and fyear=fyearq and someone delete the observations in the second dataset that has a rdq before the transaction date and then retain the first rdq after the transaction date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 19:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746865#M234350</guid>
      <dc:creator>Mistletoad</dc:creator>
      <dc:date>2021-06-09T19:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: finding the first quarterly reporting date after a transaction date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746902#M234377</link>
      <description>&lt;P&gt;First quarterly reporting date after a transaction date:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;first_quarterly_date_after = intnx('quarter',transaction_date,1,'b');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This assumes transaction_date is an actual SAS date, meaning it is the number of days since 01JAN1960.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 21:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746902#M234377</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-09T21:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: finding the first quarterly reporting date after a transaction date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746936#M234390</link>
      <description>&lt;P&gt;Given your example data, there will not be any results, as all quarterly reporting dates are more than 20 years&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; the transactions.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 04:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-first-quarterly-reporting-date-after-a-transaction/m-p/746936#M234390</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-10T04:38:56Z</dc:date>
    </item>
  </channel>
</rss>

