<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418182#M102707</link>
    <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&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;</description>
    <pubDate>Mon, 04 Dec 2017 15:25:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-12-04T15:25:36Z</dc:date>
    <item>
      <title>merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418135#M102692</link>
      <description>&lt;P&gt;I have this SAS code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why Merge the last step dose not working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SORT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=REWK0.REWORK0500_CODECOUNT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BY&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOB Category Code CODE_DESCRIPTION;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SORT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=REWK0.Paid0500TRANS &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;OUT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Paid0500TRANS;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BY&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOB Category Code CODE_DESCRIPTION;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work.REWORK0500_codecount;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;MERGE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; REWK0.REWORK0500_CODECOUNT Work.Paid0500TRANS;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BY&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOB Category Code CODE_DESCRIPTION;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 12:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418135#M102692</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-12-04T12:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418138#M102693</link>
      <description>&lt;P&gt;Define "not working". "Does not work" is about as useful as the proverbial message about the sack of rice in China.&lt;/P&gt;
&lt;P&gt;Post the log, and example of data and results not matching your expectations.&lt;/P&gt;
&lt;P&gt;If you want us to test code, post example data in data steps.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 12:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418138#M102693</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-04T12:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418139#M102694</link>
      <description>&lt;P&gt;What does the error message in your log say?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 13:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418139#M102694</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-12-04T13:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418140#M102695</link>
      <description>&lt;P&gt;Your code should work unless you have a typo in dataset names or vaiables names..&lt;/P&gt;
&lt;P&gt;Check your datasets spelling and if you have still issues post your log.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 13:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418140#M102695</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-12-04T13:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418153#M102697</link>
      <description>&lt;P&gt;This code can fail if one of your BY variables meets these conditions.&amp;nbsp; The variable is character, and has different lengths in the two incoming data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log should contain a warning about this, a warning which is fatal in this case.&amp;nbsp; The solution is simple.&amp;nbsp; Add a LENGTH statement before the MERGE statement, using the longer length from the two data sets.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work.REWORK0500_codecount;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;length code $ 10;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;MERGE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; REWK0.REWORK0500_CODECOUNT Work.Paid0500TRANS;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BY&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOB Category Code CODE_DESCRIPTION;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 14:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418153#M102697</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-04T14:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418182#M102707</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&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;</description>
      <pubDate>Mon, 04 Dec 2017 15:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge/m-p/418182#M102707</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-04T15:25:36Z</dc:date>
    </item>
  </channel>
</rss>

