<?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: Trouble saving permanent dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306954#M270575</link>
    <description>&lt;P&gt;Any WORK library is canceled when you exit&amp;nbsp;SAS session .&lt;/P&gt;
&lt;P&gt;To make a permanent library you need define:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIBNAME &amp;nbsp;my_lib 'C:/ ...'; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* on WINDOWS - choose library reference name and path */&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;LIBNAME my_lib '/home/ ...'; &amp;nbsp;/* on unix/linux -&amp;nbsp;&lt;SPAN&gt;choose library reference name and path */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then create your permanent dataset by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;DATA my_lib.my_data ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; RUN;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2016 20:17:34 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-10-24T20:17:34Z</dc:date>
    <item>
      <title>Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306644#M270569</link>
      <description>&lt;P&gt;I am having trouble saving a permanent file. I have imported the file from spss, which seemed to have worked (all variables and observations were located in the temporary 'work' folder). However when I used the syntax below to save the file permanently into another folder on my desktop, I cannot open the file again after I exit SAS. The following is the error message:&lt;BR /&gt;Unable to open the table TMP1.ABEY. TMP1.abey cannot be opened.&lt;BR /&gt;&lt;BR /&gt;It looks like it's saving properly in the folder (I see the SAS file in the folder), it just doesn't open. I've also tried different ways of opening the file- i.e.- double clicking on the dataset icon and trying to open the file directly from SAS.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Syntax:&lt;BR /&gt;proc import out= work.eating&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= 'C:\Users\dma85\Desktop\Merged_Eatig_Habits\MERGED_EatingHabitsinChildrenwithCP.sav'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=SPSS REPLACE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&lt;BR /&gt;libname xyz 'C:\Users\dma85\Desktop\Merged_Eating_Habits';&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data test;&lt;BR /&gt;set xyz.MERGED_EatingHabitsinChildrenwithCP;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data xyz.test;&lt;BR /&gt;set test;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!!&lt;/DIV&gt;</description>
      <pubDate>Sun, 23 Oct 2016 18:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306644#M270569</guid>
      <dc:creator>p_abys</dc:creator>
      <dc:date>2016-10-23T18:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306650#M270570</link>
      <description>&lt;P&gt;I see one susspicios line.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;while libname is defined as: &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;libname xyz 'C:\Users\dma85\Desktop\&lt;STRONG&gt;Merged_Eating_Habits&lt;/STRONG&gt;';&lt;/DIV&gt;
&lt;DIV&gt;then&amp;nbsp;line:&amp;nbsp;&lt;SPAN&gt;set xyz.&lt;STRONG&gt;MERGED_EatingHabits&lt;/STRONG&gt;inChildrenwithCP;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;probably &lt;U&gt;need be&lt;/U&gt;: &amp;nbsp;set &amp;nbsp;xyz.inChildrenwithCP;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;To help you more, please &lt;STRONG&gt;post the log&lt;/STRONG&gt; of creating and of saving the dataset permanently.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 19:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306650#M270570</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-23T19:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306662#M270571</link>
      <description>&lt;P&gt;You already imported your file into a SAS dataset. If you want to save the dataset, do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data xyz.eating;
set work.eating;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you assign the libname first, you can do the import immediately to library xyz.&lt;/P&gt;
&lt;P&gt;Although I would not have a SAS library where non-SAS files are stored.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 21:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306662#M270571</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-23T21:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306824#M270572</link>
      <description>&lt;P&gt;Thank you both!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kurt, I followed your suggestion, while it opened initially, after I close SAS and try to open the same file again, I get the same error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unable to open the table TMP1.eating. TMP1.eating cannot be opened.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log states:&amp;nbsp; "Format GMFCS not found or couldn't be loaded for variable gmfcs." This is stated for all my variables in the dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still not sure what I'm doing wrong!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 14:43:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306824#M270572</guid>
      <dc:creator>p_abys</dc:creator>
      <dc:date>2016-10-24T14:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306838#M270573</link>
      <description>&lt;P&gt;Make sure that library tmp1 is assigned correctly.&lt;/P&gt;
&lt;P&gt;For the format, make sure that it is created in a permanent location (not WORK!) and that the fmtsearch system option points to that location.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 15:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306838#M270573</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-24T15:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306845#M270574</link>
      <description>&lt;P&gt;How do I assign tmp1 outside of the temporary 'work' folder? When i save it, it is saved onto a folder on my desktop, so I assume it is in a permanent location since I assign the libname in that location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you help and patience. I am really new to SAS!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 15:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306845#M270574</guid>
      <dc:creator>p_abys</dc:creator>
      <dc:date>2016-10-24T15:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble saving permanent dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306954#M270575</link>
      <description>&lt;P&gt;Any WORK library is canceled when you exit&amp;nbsp;SAS session .&lt;/P&gt;
&lt;P&gt;To make a permanent library you need define:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIBNAME &amp;nbsp;my_lib 'C:/ ...'; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* on WINDOWS - choose library reference name and path */&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;LIBNAME my_lib '/home/ ...'; &amp;nbsp;/* on unix/linux -&amp;nbsp;&lt;SPAN&gt;choose library reference name and path */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then create your permanent dataset by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;DATA my_lib.my_data ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; RUN;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 20:17:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-saving-permanent-dataset/m-p/306954#M270575</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-24T20:17:34Z</dc:date>
    </item>
  </channel>
</rss>

