<?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: importing txt data file in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509949#M1854</link>
    <description>&lt;P&gt;The University Edition can only find files in the places that the virtual machine the program runs in can see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The set up should have had you create a location referred to as /folders/myfolder.&lt;/P&gt;
&lt;P&gt;You file would need to go there or in a subordinate folder and the INFILE should use that location: /folders/myfolder...&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2018 16:30:49 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-11-02T16:30:49Z</dc:date>
    <item>
      <title>importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509938#M1853</link>
      <description>&lt;P&gt;&amp;nbsp;I am using SAS studio University edition on oracle virtual machine&lt;BR /&gt;I am trying to import a data file i have attached below the file.&amp;nbsp;&lt;BR /&gt;using this code&lt;BR /&gt;&amp;nbsp;data cowdiet;&lt;BR /&gt;infile "C:\Users\mnaze\OneDrive\Fall2018\ST512\Sofwares\SASUniversityEdition\MyFolder\cowdiet.txt" firstobs=2;&lt;BR /&gt;input nitrogen $ barley $ intake;&lt;BR /&gt;run;&lt;BR /&gt;&amp;nbsp;downloaded from here: &lt;A href="http://www.stat.ncsu.edu/people/gross/courses/ST512/data/" target="_blank"&gt;http://www.stat.ncsu.edu/people/gross/courses/ST512/data/&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;but it is giving me this error&lt;BR /&gt;ERROR: Physical file does not exist,&lt;BR /&gt;/opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\mnaze\OneDrive\Fall2018\ST512\Sofwares\SASUniversityEdition\MyFolder\cowdiet.tx&lt;BR /&gt;t.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.COWDIET may be incomplete. When this step was stopped there were 0 observations and 3 variables.&lt;BR /&gt;WARNING: Data set WORK.COWDIET was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&amp;nbsp;could you point out if I am making mistake or what could be wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 16:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509938#M1853</guid>
      <dc:creator>Mn3</dc:creator>
      <dc:date>2018-11-02T16:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509949#M1854</link>
      <description>&lt;P&gt;The University Edition can only find files in the places that the virtual machine the program runs in can see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The set up should have had you create a location referred to as /folders/myfolder.&lt;/P&gt;
&lt;P&gt;You file would need to go there or in a subordinate folder and the INFILE should use that location: /folders/myfolder...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 16:30:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509949#M1854</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-02T16:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509969#M1857</link>
      <description>&lt;P&gt;HI, just a clarification. The shared folder location is identified as:&lt;BR /&gt;/folders/myfolders&lt;BR /&gt;&lt;BR /&gt;Note the 's' at the end of both words. Then look at the screen shot on this page:&lt;BR /&gt;&lt;A href="https://support.sas.com/software/products/university-edition/faq/shared_folder_whatis.htm" target="_blank"&gt;https://support.sas.com/software/products/university-edition/faq/shared_folder_whatis.htm&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;If your shared folder location is NOT defined as /myfolders, then it is not going to work correctly to access your file. If you use a C: drive location with SAS University Edition, that is not going to work either.&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 17:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509969#M1857</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-11-02T17:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509972#M1859</link>
      <description>Yeah I had that situation in my mind and infact when I downloaded the SAS i&lt;BR /&gt;created the folder SASUniversityedition and a subfolder newfolder in it.&lt;BR /&gt;that's the path that I am specifying for this file. But It gives me the&lt;BR /&gt;same error.&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Nov 2018 17:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509972#M1859</guid>
      <dc:creator>Mn3</dc:creator>
      <dc:date>2018-11-02T17:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509976#M1861</link>
      <description>Are you absolutely sure you placed the file in myfolders and are using the correct path? Find the file in the Servers Files and Folders pane, right click and select properties. That will give you the path. &lt;BR /&gt;&lt;BR /&gt;Use that in your code. If it doesn't work, post a screenshot of the file in Server Files &amp;amp; Folders, your code and log. &lt;BR /&gt;</description>
      <pubDate>Fri, 02 Nov 2018 17:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/509976#M1861</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-02T17:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510040#M1876</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/244050"&gt;@Mn3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yeah I had that situation in my mind and infact when I downloaded the SAS i&lt;BR /&gt;created the folder SASUniversityedition and a subfolder newfolder in it.&lt;BR /&gt;that's the path that I am specifying for this file. But It gives me the&lt;BR /&gt;same error.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you using C:\ path or /folders/myfolders/ path on the infile? It won't recognize the first even if it points to the same location for a couple of reasons. First, the virtual machine is running Linux not Windows, path naming conventions are different, second is that the virtual machine starts all paths with /folders/&amp;nbsp; . It just does not understand C:\ at all.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 19:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510040#M1876</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-02T19:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510106#M1883</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-11-02.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24610i0AA92F0EFA476A3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2018-11-02.png" alt="2018-11-02.png" /&gt;&lt;/span&gt;Yes I am sure I am using the right path as I right click the folder go into properties to copy the file path from there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As suggested in one of the answers to create the folder in C drive: and then define the path by going into the properties of the folder and copied the file path from there. Screenshot attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I have tried the following code:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data cowdiet; &lt;BR /&gt;infile "\\C:\SASUniversityEdition\MyFolders\cowdiet.txt" firstobs=2; &lt;BR /&gt;input nitrogen $ barley $ intake; &lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Same error:&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;73 data cowdiet;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 infile "\\C:\SASUniversityEdition\MyFolders\cowdiet.txt" firstobs=2;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 input nitrogen $ barley $ intake;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/\\C:\SASUniversityEdition\MyFolders\cowdiet.txt.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: The data set WORK.COWDIET may be incomplete. When this step was stopped there were 0 observations and 3 variables.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: Data set WORK.COWDIET was not replaced because this step was stopped.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;I have also tried "&lt;/PRE&gt;&lt;PRE&gt;data cowdiet; &lt;BR /&gt;infile "\\C:\SASUniversityEdition\Folders\MyFolders\cowdiet.txt" firstobs=2; &lt;BR /&gt;input nitrogen $ barley $ intake; &lt;BR /&gt;run;&lt;BR /&gt;but I am getting the same error. &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Nov 2018 00:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510106#M1883</guid>
      <dc:creator>Mn3</dc:creator>
      <dc:date>2018-11-03T00:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510156#M1891</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; The C: drive location will NOT work for you when you are using SAS University Edition. You need to copy the Properties from INSIDE SAS Studio, when you see the file, in SAS Studio that's pointed to SAS University Edition, click Properties and then copy the path from your Properties window into the infile statement. Like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Here you see the data on my C: drive in the SASUniversityEdition\myfolders location&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_1_cowdiet_in_Windows.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24619i9610B82B5DB0D70B/image-size/large?v=v2&amp;amp;px=999" role="button" title="_1_cowdiet_in_Windows.png" alt="_1_cowdiet_in_Windows.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) BUT, I can't use the C: drive location in my code, so I go over to SAS Studio and right click on the file name from the SAS Studio Files and Folders pane&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_2_get_properties_SAS_Studio.png" style="width: 263px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24620i17DF3A2AFE6B5E4E/image-size/large?v=v2&amp;amp;px=999" role="button" title="_2_get_properties_SAS_Studio.png" alt="_2_get_properties_SAS_Studio.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) I copy the location from the Properties window into my program and run my program&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_3_use_location_in_code.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24621i74DB6237934A4394/image-size/large?v=v2&amp;amp;px=999" role="button" title="_3_use_location_in_code.png" alt="_3_use_location_in_code.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note how the location that is showing in SAS Studio is NOT a C: drive location. It is /folders/myfolders/cowdiet.txt -- and THIS is the location that shows in my program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) The program runs successfully.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_4_code_runs_correctly.png" style="width: 569px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24622i1CAD98F3730BFD90/image-size/large?v=v2&amp;amp;px=999" role="button" title="_4_code_runs_correctly.png" alt="_4_code_runs_correctly.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here's why you CANNOT use a Windows path in your code in SAS Studio:&lt;/P&gt;
&lt;P&gt;You have a computer, a Windows computer that needs to run SAS University Edition.&lt;/P&gt;
&lt;P&gt;You put VirtualBox (or VMWare) on your machine as the application that will host SAS in a Virtual Machine.&lt;/P&gt;
&lt;P&gt;You install the SAS Virtual Machine into VirtualBox or VMWare.&lt;/P&gt;
&lt;P&gt;SAS in the Virtual Machine is running on a Linux image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, think of it as a box in a box in a box&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="box_in_box.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24625i0415869CE772E348/image-size/large?v=v2&amp;amp;px=999" role="button" title="box_in_box.png" alt="box_in_box.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the "outer" box level, the Windows level, your shared drive has a "C:" location. but you cannot use this Windows location in your SAS University Edition code. SAS is running in a Linux VM and so, needs a Unix location reference. That's why you set up a shared folder. At the Windows level (#1), you see it as a Windows file. At the SAS level (#3), SAS sees it as a Unix file. So in your code, you need to use a Unix name. The "official" location, on a Windows or a Mac, for the shared folder location is:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;/folders/myfolders&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So a file put into your shared folder location and referenced in your program MUST use the Unix name for the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. As you can see in my log, with the correct location, your code runs correctly.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 03 Nov 2018 14:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510156#M1891</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-11-03T14:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: importing txt data file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510171#M1892</link>
      <description>&lt;P&gt;SAS University Edition is running in a Unix virtual machine. It is not running directly on your Windows machine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You posted a screen shot from your Windows machine. Not a screen shot of the SAS/Studio interface that would show where the file is when viewed from the Unix virtual machine.&lt;/P&gt;
&lt;P&gt;But if you have configured your virtual machine right then /folders/myfolders/ should point to the&amp;nbsp;&lt;SPAN&gt;C:\SASUniversityEdition\MyFolders\&lt;/SPAN&gt; &amp;nbsp; folder you can see from Windows.&lt;/P&gt;
&lt;P&gt;So your code should look like this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cowdiet; 
  infile "/folders/myfolders/cowdiet.txt" firstobs=2; 
  input nitrogen $ barley $ intake; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But remember that Unix is case sensitive. So if the file is really named Cowdiet.txt (with an uppercase C) then Unix will not find it if you look for it with a lowercase c.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Nov 2018 15:00:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/importing-txt-data-file/m-p/510171#M1892</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-03T15:00:47Z</dc:date>
    </item>
  </channel>
</rss>

