<?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: merging monthly data and daily to daily data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572588#M161593</link>
    <description>Somehow I solved the issue and thank for your help I will attach data code instead of pics later!</description>
    <pubDate>Thu, 11 Jul 2019 02:50:24 GMT</pubDate>
    <dc:creator>JKCho</dc:creator>
    <dc:date>2019-07-11T02:50:24Z</dc:date>
    <item>
      <title>merging monthly data and daily to daily data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572515#M161559</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I merged two(monthly and daily) and made a merged daily one but the daily one is not like what I want...&lt;/P&gt;&lt;P&gt;I used a merge code as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CRSP_new;
set CRSP1;
year = YEAR(date);
run;

proc sql;
create table crspcomp as
select a.* , b.*
from cstatcusip1 a
inner join CRSP_new b
on a.cusip8 = b.cusip and a.fyear= b.year;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and... it made this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 128px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30923iC70142B59C81FF19/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I rather wanted to have is no double dates on NamesDate row in chronological order and the same in I/B/E/S row too.&lt;/P&gt;&lt;P&gt;As seen below, IBES is a monthly data set and it has median values that need to be matched by CUSIP and date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is... medians need to be changed when corresponding I/B/E/S dates change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 271px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30924i3FB2F72F12BD4B85/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems kind of advanced than I usually deal with and cannot be done by the above code as this time needs chronological order + corresponding changes in median values. I referred to some related threads but failed to make it. and finally asking for your help again...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please share some advice again&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I sincerely appreciate all of your help!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 20:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572515#M161559</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-10T20:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: merging monthly data and daily to daily data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572545#M161574</link>
      <description>&lt;P&gt;Examples of the input data would be helpful. You have hidden A LOT by not listing variable names as a minimum and likely cutting out much of the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;Examples from BOTH of your INPUT data sets are needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pictures of data are very hard to write code against.&lt;/P&gt;
&lt;P&gt;It also appears that you need to match something by an actual date value, not the YEAR.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 22:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572545#M161574</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-10T22:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: merging monthly data and daily to daily data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572555#M161579</link>
      <description>&lt;P&gt;Also show your expected output.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 22:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572555#M161579</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-07-10T22:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: merging monthly data and daily to daily data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572588#M161593</link>
      <description>Somehow I solved the issue and thank for your help I will attach data code instead of pics later!</description>
      <pubDate>Thu, 11 Jul 2019 02:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-monthly-data-and-daily-to-daily-data/m-p/572588#M161593</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-11T02:50:24Z</dc:date>
    </item>
  </channel>
</rss>

