<?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: Merge generates 0 observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390495#M277623</link>
    <description>&lt;P&gt;Post:&lt;/P&gt;
&lt;P&gt;- the code&lt;/P&gt;
&lt;P&gt;- the log&lt;/P&gt;
&lt;P&gt;- example data that illustrates your issue; do so in data steps generated with the macro from&amp;nbsp;&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;, so we can easily recreate your datasets with all attributes as they are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without that supplemental information, every suggestion will just be guesswork and mostly useless for you.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2017 05:45:32 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-08-24T05:45:32Z</dc:date>
    <item>
      <title>Merge generates 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390452#M277619</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is quite weired but I indeed encountered this.&lt;/P&gt;&lt;P&gt;I tried to merge two datasets and I was pretty sure they are many&amp;nbsp;same values for &amp;nbsp;all "by" variables. However, I got 0 oberservations when I specify "if a and b". Why does it happen?&lt;/P&gt;&lt;P&gt;____________________________________________________________________________________________________________&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying. Now I am pretty sure the problem is from importing CSV data. Could anyone make a code to properly import the data into SAS? You might download "2012 Q1" from the following link:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sec.gov/opa/data/market-structure/market-structure-data-security-and-exchange.html" target="_blank"&gt;https://www.sec.gov/opa/data/market-structure/market-structure-data-security-and-exchange.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be specific, variables "date" should be a yymmdd8. variable, "Security" and "ticker" should be characters, and the rest should be all numerics. I tried different ways, but all give me either missing values, or log ouput like the following when later:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 00:58:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390452#M277619</guid>
      <dc:creator>xyxu</dc:creator>
      <dc:date>2017-08-25T00:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Merge generates 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390459#M277620</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/99650"&gt;@xyxu&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Generic answer: Your condition in the subsetting IF statement is highly likely never TRUE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post at a minimum your code so we have something to work with.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 23:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390459#M277620</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-08-23T23:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Merge generates 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390479#M277621</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/99650"&gt;@xyxu&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I was pretty sure they are many&amp;nbsp;same values for &amp;nbsp;all "by" variables.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;They look the same but aren't for some reason, variable length or case (upper/lower) are examples.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 01:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390479#M277621</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-24T01:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Merge generates 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390488#M277622</link>
      <description>&lt;P&gt;Just checking: you use a MERGE statement&amp;nbsp;and not a SET statement, right?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 03:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390488#M277622</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-08-24T03:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merge generates 0 observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390495#M277623</link>
      <description>&lt;P&gt;Post:&lt;/P&gt;
&lt;P&gt;- the code&lt;/P&gt;
&lt;P&gt;- the log&lt;/P&gt;
&lt;P&gt;- example data that illustrates your issue; do so in data steps generated with the macro from&amp;nbsp;&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;, so we can easily recreate your datasets with all attributes as they are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without that supplemental information, every suggestion will just be guesswork and mostly useless for you.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 05:45:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-generates-0-observations/m-p/390495#M277623</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-24T05:45:32Z</dc:date>
    </item>
  </channel>
</rss>

