<?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/340492#M77837</link>
    <description>&lt;P&gt;The log error tells you everything you need to know, you have no libraries setup for those two references. &amp;nbsp;A libname is a container for other files such as datasets, and you assign these by:&lt;/P&gt;
&lt;PRE&gt;libname &amp;lt;reference&amp;gt; "&amp;lt;network path to files&amp;gt;";

e.g. 

libname mine "c;\myfolder";
This creates a library reference mine, pointing to that path.  And you can use this to reference datasets witihn that folder by:

data want;
  set &amp;lt;reference&amp;gt;.&amp;lt;dataset&amp;gt;;
run;

&lt;/PRE&gt;</description>
    <pubDate>Mon, 13 Mar 2017 17:01:16 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-03-13T17:01:16Z</dc:date>
    <item>
      <title>Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340483#M77835</link>
      <description>&lt;PRE&gt;data Merge1;&lt;BR /&gt; merge Airbag.ctl Alignmt.ctl;&lt;BR /&gt; by Report_Number;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;Am trying to merge the datasets Airbag and Alignmt but I received the following error messages&lt;/P&gt;&lt;P&gt;ERROR: Libref AIRBAG is not assigned&lt;/P&gt;&lt;P&gt;ERROR: Libref ALIGNMT is not assigned&lt;/P&gt;&lt;P&gt;Moses&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340483#M77835</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-13T16:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340488#M77836</link>
      <description>&lt;P&gt;You are specifying your table names as libraries and your library as the table name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume you want:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Merge1;
 merge ctl.Airbag ctl.Alignmt;
 by Report_Number;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:54:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340488#M77836</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-03-13T16:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340492#M77837</link>
      <description>&lt;P&gt;The log error tells you everything you need to know, you have no libraries setup for those two references. &amp;nbsp;A libname is a container for other files such as datasets, and you assign these by:&lt;/P&gt;
&lt;PRE&gt;libname &amp;lt;reference&amp;gt; "&amp;lt;network path to files&amp;gt;";

e.g. 

libname mine "c;\myfolder";
This creates a library reference mine, pointing to that path.  And you can use this to reference datasets witihn that folder by:

data want;
  set &amp;lt;reference&amp;gt;.&amp;lt;dataset&amp;gt;;
run;

&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340492#M77837</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-13T17:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340503#M77838</link>
      <description>&lt;P&gt;Please attached is my full screen. I am very new using SAS,trying to learn by myself and this is my very first task I am trying to perform, so I need help and direction,&lt;/P&gt;&lt;P&gt;Thanaks&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340503#M77838</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-13T17:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340504#M77839</link>
      <description>&lt;P&gt;Sorry, opening attachment files is a security risk. &amp;nbsp;I would recommend you follow the SAS video training:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/training/tutorial/" target="_blank"&gt;http://support.sas.com/training/tutorial/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As this will explain things - assigning libraries is pretty much learning step 1.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340504#M77839</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-13T17:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340517#M77840</link>
      <description>&lt;P&gt;No this doesnt work. It now says "Libref CTL is not assigned&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340517#M77840</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-13T17:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340518#M77841</link>
      <description>&lt;P&gt;ok thank you&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340518#M77841</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-13T17:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340554#M77848</link>
      <description>&lt;P&gt;I understand that Airbag and Alignment are two sas datasets.&lt;/P&gt;
&lt;P&gt;Are they in a subdirectory named ctl ?&lt;/P&gt;
&lt;P&gt;If yes - add a line ahead of your code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname ctl "...path to the subdirectory ...";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then use datasetst as: ctl.Airbag, ctl.Alignment.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 19:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340554#M77848</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-13T19:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340563#M77849</link>
      <description>&lt;P&gt;Looks like you're using SAS UE. Try the following (although you may have to first sort all of those files by Report_Number) and I may have misspelled some of your file names:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;libname ctl "/folders/myfolders";

data merge1;
  merge ctl.airbag ctl.alignment ctl.driver ctl crashcha
          ctl.inserty ctl.speed ctl.weather;
  by Report_Number;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 19:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/340563#M77849</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-13T19:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/342480#M78530</link>
      <description>&lt;P&gt;Thank you. Eventually, this is what I did after watching some videos from Techsupport. I created a libref and that solved the problem, and I was able to merge. Thank you. But another problem emerged. The ID column that I am merging by, has multiple data in some of the tables. So when I sort the data SAS tells me that the tables are not well sorted and it stops after reading less that half of the rows.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 07:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/342480#M78530</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-20T07:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/342481#M78531</link>
      <description>&lt;P&gt;Thank you. Watching the tutorial helped. I created the libref and it worked. But only few rows were merged because SAS could not sort the data correctly. The ID column that I am merging by, has repeated names in most of the rows. So when I sort the data SAS gives an error message that the tables are not well sorted.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 07:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/342481#M78531</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-20T07:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/342482#M78532</link>
      <description>&lt;P&gt;I performed the merge after watching some tutorial videos on creating libref. I created the libref and it worked. But only few rows were merged because SAS could not sort the data correctly. The ID column that I am merging by, has repeated names in most of the rows. So when I sort the data SAS gives an error message that the tables are not well sorted.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 07:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge/m-p/342482#M78532</guid>
      <dc:creator>mtefe</dc:creator>
      <dc:date>2017-03-20T07:14:45Z</dc:date>
    </item>
  </channel>
</rss>

