<?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 I import a sas7bdat file to SAS studio and then save it to a folder in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558859#M7561</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173636"&gt;@Satori&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;How do I define a libname for the directory? And after doing that, what statement should I use?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I&amp;nbsp;&lt;STRONG&gt;STRONGLY&lt;/STRONG&gt; recommend that you work through the free online &lt;A href="https://support.sas.com/edu/schedules.html?ctry=us&amp;amp;crs=PROG1" target="_blank" rel="noopener"&gt;Programming 1&lt;/A&gt; course, as that will guide you through all these questions in a proper, structured way.&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=n1nk65k2vsfmxfn1wu17fntzszbp.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;libname&lt;/A&gt; and other statements are documented in the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=pgmsashome&amp;amp;docsetTarget=home.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Programming Documentation&lt;/A&gt; at &lt;A href="https://documentation.sas.com/?docsetId=helpcenterdefault&amp;amp;docsetTarget=surfedin.htm&amp;amp;docsetVersion=1.0&amp;amp;locale=en" target="_blank" rel="noopener"&gt;documentation.sas.com&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2019 10:54:56 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-05-15T10:54:56Z</dc:date>
    <item>
      <title>How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558844#M7555</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a .sas7bdat file, I have set up a shared folder and I am using VM virtual box and SAS studio with SAS university edition.&lt;/P&gt;&lt;P&gt;I just want to import this file to the studio and then save it to the shared folder with a different name.&lt;/P&gt;&lt;P&gt;I know very little about SAS.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 09:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558844#M7555</guid>
      <dc:creator>Satori</dc:creator>
      <dc:date>2019-05-15T09:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558847#M7556</link>
      <description>&lt;P&gt;you may need to create two libraries like below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname one '¬path1';
libname two'¬path2';


data two.test;
set one.test;
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>Wed, 15 May 2019 10:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558847#M7556</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-05-15T10:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558852#M7557</link>
      <description>&lt;P&gt;As a .sas7bdat is already a SAS dataset file, there is no need to&amp;nbsp;&lt;EM&gt;import&lt;/EM&gt; it. You (only) have to put it into a directory where SAS has access to, and define a libname for that directory. After that, the dataset can be used in a set/merge statement, or in a data= option in a proc statement, or in proc sql.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 10:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558852#M7557</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-15T10:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558854#M7558</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How do I define a libname for the directory? And after doing that, what statement should I use?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 10:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558854#M7558</guid>
      <dc:creator>Satori</dc:creator>
      <dc:date>2019-05-15T10:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558856#M7559</link>
      <description>&lt;P&gt;What do I put in path 1 and path 2? And what do two.test and one.test refer to?&lt;/P&gt;&lt;P&gt;Can you provide an example?&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 10:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558856#M7559</guid>
      <dc:creator>Satori</dc:creator>
      <dc:date>2019-05-15T10:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558857#M7560</link>
      <description>&lt;P&gt;here path 1 represent the path or location of the folder from where you want to import the SAS dataset&lt;/P&gt;
&lt;P&gt;path 2 represents the location of the folder where you want to copy the same dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the below will copy the sas dataset from path1 to path2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here test is the name of the dataset that you want to copy/import from path1 to path2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data two.test;
set one.test;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 May 2019 10:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558857#M7560</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-05-15T10:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558859#M7561</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173636"&gt;@Satori&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;How do I define a libname for the directory? And after doing that, what statement should I use?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I&amp;nbsp;&lt;STRONG&gt;STRONGLY&lt;/STRONG&gt; recommend that you work through the free online &lt;A href="https://support.sas.com/edu/schedules.html?ctry=us&amp;amp;crs=PROG1" target="_blank" rel="noopener"&gt;Programming 1&lt;/A&gt; course, as that will guide you through all these questions in a proper, structured way.&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=n1nk65k2vsfmxfn1wu17fntzszbp.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;libname&lt;/A&gt; and other statements are documented in the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=pgmsashome&amp;amp;docsetTarget=home.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Programming Documentation&lt;/A&gt; at &lt;A href="https://documentation.sas.com/?docsetId=helpcenterdefault&amp;amp;docsetTarget=surfedin.htm&amp;amp;docsetVersion=1.0&amp;amp;locale=en" target="_blank" rel="noopener"&gt;documentation.sas.com&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 10:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558859#M7561</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-15T10:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then save it to a folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558877#M7562</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173636"&gt;@Satori&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a .sas7bdat file, I have set up a shared folder and I am using VM virtual box and SAS studio with SAS university edition.&lt;/P&gt;
&lt;P&gt;I just want to import this file to the studio and then save it to the shared folder with a different name.&lt;/P&gt;
&lt;P&gt;I know very little about SAS.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So if you have setup a shared folder then place the file into that folder (or a subfolder under it).&lt;/P&gt;
&lt;P&gt;No matter what path you use to reference the folder from your PC the path that the SAS code (which is running in the VM) must use is /folders/myfolders as explained in the process you just did to setup the shared folder.&amp;nbsp; You can discover the proper path by finding the file in the SAS/Studio user interface and use the right click mouse button to open the properties for the file.&amp;nbsp; One of the properties is the path (physical filename) for the file.&amp;nbsp; So just copy that into your program.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can reference a SAS dataset in two ways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The traditional way is to create a libref that points to the folder that contains the file by running a LIBNAME statement. Then you can use the libref along with the member name to refer to the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other way is to just use the physical path inside of quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you have a file name 'mydata.sas7bdat'&amp;nbsp; (note that the filename MUST be in all lowercase letters as SAS is running in Unix environment where filenames are case sensitive) then you code could look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib '/folders/myfolders';
proc contents data=mylib.mydata; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data="/folders/myfolders/mydata.sas7bdat"; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 12:06:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-save-it/m-p/558877#M7562</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-15T12:06:26Z</dc:date>
    </item>
  </channel>
</rss>

