<?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: How do you import 2 datasets into one library? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597963#M172366</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/295959"&gt;@tiara19&lt;/a&gt; - If you have an LSD_MATH library then specify LSD_MATH.Want1 and LSD_MATH.Want2 to output to two datasets WANT1 and WANT2 in the LSD_MATH library.&lt;/P&gt;</description>
    <pubDate>Sun, 20 Oct 2019 03:49:16 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-10-20T03:49:16Z</dc:date>
    <item>
      <title>How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597949#M172362</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a homework assignment and I'm supposed to import two files into the same SAS Library. When I write out the code, only one of the datasets imports (either the LSD csv file or the MATH file but not both). What am I doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After I figure this out, the next step is to merge the two datasets into a single data set, but I'm just stuck on the above step! Thanks for your help. Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc import&lt;BR /&gt;&lt;BR /&gt;datafile = "/folders/myfolders/LSD.csv" &lt;BR /&gt;/*folder/myfolders*/&lt;BR /&gt;&lt;BR /&gt;out = LSD_MATH&lt;BR /&gt;&lt;BR /&gt;dbms = csv&lt;BR /&gt;&lt;BR /&gt;replace;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and the other:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc import&lt;BR /&gt;&lt;BR /&gt;datafile = "/folders/myfolders/Math.csv" &lt;BR /&gt;/*folder/myfolders*/&lt;BR /&gt;&lt;BR /&gt;out = LSD_MATH&lt;BR /&gt;&lt;BR /&gt;dbms = csv&lt;BR /&gt;&lt;BR /&gt;replace;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I've also tried running them in the same "program" and in different ones. It still doesn't work. Please help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 00:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597949#M172362</guid>
      <dc:creator>tiara19</dc:creator>
      <dc:date>2019-10-20T00:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597960#M172364</link>
      <description>&lt;P&gt;Looks like you are writing both CSV files to the same output SAS dataset - LSD_MATH - so the second import overwrites the first. Change the name of your first or second dataset to fix this.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 03:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597960#M172364</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-20T03:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597962#M172365</link>
      <description>SASKiwi,&lt;BR /&gt;&lt;BR /&gt;Okay, you've given me something to think about here. I thought LSD_MATH was&lt;BR /&gt;the name of the library it would go to, when I give the "Out" Command. How&lt;BR /&gt;do I ensure in the code that it goes to my LSD_MATH library? The&lt;BR /&gt;assignment says they have to go to that library together.&lt;BR /&gt;&lt;BR /&gt;Forgive me, I'm sooo new with SAS- Very much appreciate a quick response &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 20 Oct 2019 03:12:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597962#M172365</guid>
      <dc:creator>tiara19</dc:creator>
      <dc:date>2019-10-20T03:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597963#M172366</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/295959"&gt;@tiara19&lt;/a&gt; - If you have an LSD_MATH library then specify LSD_MATH.Want1 and LSD_MATH.Want2 to output to two datasets WANT1 and WANT2 in the LSD_MATH library.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 03:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597963#M172366</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-20T03:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597976#M172372</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/295959"&gt;@tiara19&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so you can write something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile = "/folders/myfolders/LSD.csv" /*folder/myfolders*/
            out = LSD_MATH.want1 /*LDS_MATH = name of the library, want1 = name of the dataset*/
            dbms = csv&lt;BR /&gt;            replace;
run;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;proc import datafile = "/folders/myfolders/Math.csv" /*folder/myfolders*/&lt;BR /&gt;            out = LSD_MATH.want2 &lt;CODE class=" language-sas"&gt;/*LDS_MATH = name of the library, want2 = name of the dataset*/&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE class=" language-sas"&gt;            dbms = csv&lt;BR /&gt;            replace;
run;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to store your datasets permanently in a physical folder (not only in the temporary work library), be sure that you have correctly referenced your library before writing the code above.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname LSD_MATH "path"; /*specify the path to store permanently both datasets*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 11:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597976#M172372</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-10-20T11:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597980#M172374</link>
      <description>&lt;P&gt;First, you create a library named LSD_MATH:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname LSD_MATH "/folders/myfolders/";&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then we can import both the datasets into that library:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc import datafile = "/folders/myfolders/LSD.csv" 
out = LSD_MATH.LSD
dbms = csv
replace;
getnames = yes;
run;



proc import datafile = "/folders/myfolders/MATH.csv" 
out = LSD_MATH.MATH
dbms = csv
replace;
getnames = yes;
run;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Oct 2019 12:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597980#M172374</guid>
      <dc:creator>chaatak</dc:creator>
      <dc:date>2019-10-20T12:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597984#M172377</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANK YOU both so much for your help! That is exactly what I needed. Funny how such a small detail can be so hard to figure out. I was able to work through the rest of the assignment pretty quickly after that. THANK YOU!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been struggling because it appears SAS University for Mac is different than others (i'm not sure my teacher or my textbook understand the different nuances) - is there a good tutorial or book on SAS Programming specifically for SAS U for IOS? Thanks again!&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 15:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/597984#M172377</guid>
      <dc:creator>tiara19</dc:creator>
      <dc:date>2019-10-20T15:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/598024#M172398</link>
      <description>&lt;P&gt;That’s not quite correct, SAS UE is similar to a server installation of SAS, whether it’s EG or Base. The primary difference between these has to do with using an application that’s not local so you need to have that computer (server/UE) see your computer, which is accomplished via shared folders. The path that the SAS server sees is different than your local machine, ie&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS UE - /folders/myfolders&lt;/P&gt;
&lt;P&gt;Your computer C:\users\tiara19\SASUniversityEdition\myfolders&lt;/P&gt;
&lt;P&gt;or Max equivalent&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;those are both the same location.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides that, the method and syntax for code is the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI - I currently use SAS UE on my Macbook at home and use SAS on desktop at work. Other than changing the file paths for the code, the same code will work fine on both systems.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you’d like to learn about SAS there’s two free ecourses, but it’s not different beyond the myfolders issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/295959"&gt;@tiara19&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THANK YOU both so much for your help! That is exactly what I needed. Funny how such a small detail can be so hard to figure out. I was able to work through the rest of the assignment pretty quickly after that. THANK YOU!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been struggling because it appears SAS University for Mac is different than others (i'm not sure my teacher or my textbook understand the different nuances) - is there a good tutorial or book on SAS Programming specifically for SAS U for IOS? Thanks again!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 05:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/598024#M172398</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-21T05:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import 2 datasets into one library?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/598931#M172808</link>
      <description>&lt;P&gt;Thank you Reeza! It probably just feels that way because I get so lost sometimes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I'll check out those courses. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 06:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-you-import-2-datasets-into-one-library/m-p/598931#M172808</guid>
      <dc:creator>tiara19</dc:creator>
      <dc:date>2019-10-24T06:06:06Z</dc:date>
    </item>
  </channel>
</rss>

