<?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 dataset with multiple variable length in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173414#M2019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey mlogan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure you can find a macro to do this on google.&lt;/P&gt;&lt;P&gt;And Art Carpenter's book has a macro for EVERYHTING... &lt;A href="http://www.sas.com/store/prodBK_59224_en.html" title="http://www.sas.com/store/prodBK_59224_en.html"&gt;Carpenter's Complete Guide to the SAS® Macro Language, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't have a lot of variables just choose a length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data mymerged;&lt;/P&gt;&lt;P&gt;length country $25;&lt;/P&gt;&lt;P&gt;merge dataone datatwo;&lt;/P&gt;&lt;P&gt;by commonid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have a chance, take the programming 1 class and this certification: &lt;A href="http://support.sas.com/certify/creds/bp.html" title="http://support.sas.com/certify/creds/bp.html"&gt;SAS Global Certification: SAS Certified Base Programmer &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Feb 2015 16:24:34 GMT</pubDate>
    <dc:creator>M_Maldonado</dc:creator>
    <dc:date>2015-02-18T16:24:34Z</dc:date>
    <item>
      <title>merging dataset with multiple variable length</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173412#M2017</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;Can someone tell me the most efficient way to merge two dataset with multiple variable length (either &lt;EM&gt;by variable&lt;/EM&gt; or other &lt;EM&gt;common variable&lt;/EM&gt; to be merged). Is there a macro that will solve this problem for any variable within the dataset?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I defined the output variable length as follows, and it still does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data test&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;length Country$ 12.;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;merge one two;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;by Country;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: my right table (two) by variable length is 12 and left table (one) by variable length is 10 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173412#M2017</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2015-02-18T16:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: merging dataset with multiple variable length</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173413#M2018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure it's an ERROR?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to "fix" the lengths such that they match in both data sets or you could use the SAS system option to turn off the message and ignore this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps someone has such a macro as you suggest or you can make your own.&amp;nbsp; Quite simple I should think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173413#M2018</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-02-18T16:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: merging dataset with multiple variable length</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173414#M2019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey mlogan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure you can find a macro to do this on google.&lt;/P&gt;&lt;P&gt;And Art Carpenter's book has a macro for EVERYHTING... &lt;A href="http://www.sas.com/store/prodBK_59224_en.html" title="http://www.sas.com/store/prodBK_59224_en.html"&gt;Carpenter's Complete Guide to the SAS® Macro Language, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't have a lot of variables just choose a length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data mymerged;&lt;/P&gt;&lt;P&gt;length country $25;&lt;/P&gt;&lt;P&gt;merge dataone datatwo;&lt;/P&gt;&lt;P&gt;by commonid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have a chance, take the programming 1 class and this certification: &lt;A href="http://support.sas.com/certify/creds/bp.html" title="http://support.sas.com/certify/creds/bp.html"&gt;SAS Global Certification: SAS Certified Base Programmer &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/merging-dataset-with-multiple-variable-length/m-p/173414#M2019</guid>
      <dc:creator>M_Maldonado</dc:creator>
      <dc:date>2015-02-18T16:24:34Z</dc:date>
    </item>
  </channel>
</rss>

