<?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: File Path does not exist in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544640#M74258</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data= libname.storm_summary;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the preferred way to use SAS data sets. Create a library reference that points to the storage location using a LIBNAME statement.&lt;/P&gt;
&lt;P&gt;Something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib "/folders/myfolders/EPG194/data";
proc contents data=mylib.storm_summary;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use a complete path:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data &lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;=&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;"&lt;STRONG&gt;&lt;FONT color="#ff0000" size="4"&gt;/&lt;/FONT&gt;&lt;/STRONG&gt;folders/myfolders/EPG194/data/storm_summary.sas7ddat";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 16:55:34 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-03-20T16:55:34Z</dc:date>
    <item>
      <title>File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544639#M74257</link>
      <description>&lt;P&gt;IN SAS Studio Lesson 2 Activity- Create PROC CONTENTS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I check the location&amp;nbsp; for the storm_summary.sas7bdat in SAS Studio GUI and Windows Explorer location.&lt;/P&gt;&lt;P&gt;In SAS Studio it's&amp;nbsp; /folders/myfolders/EPG194/data&lt;/P&gt;&lt;P&gt;In Windows it's&amp;nbsp; C:/SASUniversityEdition/myfolder/EPG194/data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using either or i get an error that the file path does not exist&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data="C:/SASUnviersityEdition/myfolder/EPG194/data/storm_summary.sas7bdat";
run;


proc contents data"folders/myfolders/EPG194/data/storm_summary.sas7ddat";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544639#M74257</guid>
      <dc:creator>Tjs</dc:creator>
      <dc:date>2019-03-20T16:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544640#M74258</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data= libname.storm_summary;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the preferred way to use SAS data sets. Create a library reference that points to the storage location using a LIBNAME statement.&lt;/P&gt;
&lt;P&gt;Something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib "/folders/myfolders/EPG194/data";
proc contents data=mylib.storm_summary;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use a complete path:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data &lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;=&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;"&lt;STRONG&gt;&lt;FONT color="#ff0000" size="4"&gt;/&lt;/FONT&gt;&lt;/STRONG&gt;folders/myfolders/EPG194/data/storm_summary.sas7ddat";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544640#M74258</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-20T16:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544655#M74259</link>
      <description>Thank you! I used the full path and it worked&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Mar 2019 17:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544655#M74259</guid>
      <dc:creator>Tjs</dc:creator>
      <dc:date>2019-03-20T17:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544658#M74260</link>
      <description>&lt;P&gt;If your path does not start with / then it is a RELATIVE path and not an ABSOLUTE path.&lt;/P&gt;
&lt;P&gt;That will not work in SAS UE since the current directory is NOT the root node.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 17:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544658#M74260</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-20T17:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544665#M74261</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;The reason the first data=option did not work was that you cannot use a C: drive location with SAS University Edition.&lt;BR /&gt;&lt;BR /&gt;The reason that the second data= option did not work was that you left the = sign out of the option and you also mis-spelled the location value.&lt;BR /&gt;&lt;BR /&gt;For SAS University Edition, your main folder is &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;/folders&lt;/STRONG&gt; &lt;/FONT&gt;&lt;BR /&gt;(&lt;U&gt;&lt;STRONG&gt;not&lt;/STRONG&gt; &lt;/U&gt;a Windows drive location)&lt;/P&gt;
&lt;P&gt;and your shared folder location is &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;/myfolders&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;so, the correct top level full path is (with a leading slash):&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;/&lt;/FONT&gt;folders/myfolders &lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Then, if your /&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;EPG194&lt;/STRONG&gt; &lt;/FONT&gt;folders are UNDER that path, then the full and correct location would be (including slashes):&lt;BR /&gt;data="&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;/&lt;/FONT&gt;folders/myfolders/EPG194/data/storm_summary.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;";&lt;BR /&gt;&lt;BR /&gt;Other commenters are correct that the LIBNAME method is a more efficient way to reference SAS data sets. However the purpose of this activity in Programming 1 is to show that it is possible to use a physical location reference in SAS code. However, using a long path name can get cumbersome and after we show you that this technique will work, we then show the SAS syntax for LIBNAME usage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 17:58:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544665#M74261</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-03-20T17:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544673#M74262</link>
      <description>&lt;P&gt;Problem resolved.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 18:14:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/544673#M74262</guid>
      <dc:creator>Tjs</dc:creator>
      <dc:date>2019-03-20T18:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/545207#M74290</link>
      <description>&lt;P&gt;Please mark a message as solution.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 13:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/545207#M74290</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-22T13:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/549041#M74459</link>
      <description>&lt;P&gt;I'm new to SAS and using SAS Studio. I tried all these methods but it did not work. I finally right-clicked on data and choose properties to see its full path which is "/home/u36524443/EPG194/data" and used it instead. It run perfectly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc contents data="/home/u36524443/EPG194/data/storm_summary.sas7bdat";&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2019 14:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/549041#M74459</guid>
      <dc:creator>qxpham</dc:creator>
      <dc:date>2019-04-06T14:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/549042#M74460</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You are using SAS OnDemand for Academics. The previous poster was using SAS University Edition in a Virtual Machine. For your path, and the exercise you're on, your "high Level" path is:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF00FF"&gt;&lt;STRONG&gt;/home/&lt;EM&gt;&amp;lt;youruserid&amp;gt;&lt;/EM&gt;/EPG194/data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then all the data sets and XLSX and other files used in class are in that location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; After you do this practice using the fully qualified path for the storm_summary we're next going to show you the LIBNAME statement, which is a simpler way of accessing SAS datasets instead of using the fully qualified path. Instead of THIS:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc contents data="&lt;FONT color="#FF00FF"&gt;/home/&lt;EM&gt;&amp;lt;youruserID&amp;gt;&lt;/EM&gt;/EPG194/data&lt;/FONT&gt;/&lt;FONT color="#008000"&gt;storm_summary.sas7bdat&lt;/FONT&gt;";&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The next thing you'll learn is how to do THIS:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;** 1) point to high level location and give it an "alias" or library reference as a nickname;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname &lt;FONT color="#FF00FF"&gt;PG1&lt;/FONT&gt; "&lt;FONT color="#FF00FF"&gt;/home/&lt;EM&gt;&amp;lt;youruserID&amp;gt;&lt;/EM&gt;/EPG194/data&lt;/FONT&gt;";&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;** 2) Use the nickname instead of the full path name in code;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc contents data=&lt;FONT color="#FF00FF"&gt;pg1&lt;/FONT&gt;.&lt;FONT color="#008000"&gt;storm_summary&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Have fun with the class.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Cynthia&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2019 14:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/549042#M74460</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-04-06T14:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688808#M79616</link>
      <description>&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;Using SASUniversityEdition with Windows 10 Prof&lt;/P&gt;&lt;P&gt;for SAS Programming 1: Essentials&lt;/P&gt;&lt;P&gt;Lesson 2: Accessing Data&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* This works;&lt;BR /&gt;libname mylib "/folders/myfolders/sasuser.v94/EPG1V2/data";&lt;BR /&gt;proc contents data=mylib.storm_summary;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* and this works;&lt;BR /&gt;proc contents&lt;BR /&gt;data="/folders/myfolders/sasuser.v94/EPG1V2/data/storm_summary.sas7bdat";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* but this gets an invalid data set name error;&lt;BR /&gt;libname mylib "/folders/myfolders/sasuser.v94/EPG1V2/data";&lt;BR /&gt;proc contents data=mylib.storm_summary.sas7bdat;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;* I do not understand why the file extension must be entered into the second form; but cannot be entered into the third form. ;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 01:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688808#M79616</guid>
      <dc:creator>SAS1246996</dc:creator>
      <dc:date>2020-10-05T01:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688812#M79617</link>
      <description>Hi:&lt;BR /&gt;  You have 2 choices for referencing a SAS dataset:&lt;BR /&gt;1) your first example -- using a 2 level name that consists of LIB.DATASET where you have a LIBNAME statement that defines the library nickname or library reference as the first level of the name and then the table or dataset that you want to reference is the second level of the 2 level name. This method does NOT need a file extension.&lt;BR /&gt;OR&lt;BR /&gt;2) your second example -- a fully qualified operating system name that includes the FULL path, including the filename and file extension -- in this case sas7bdat is the file extension for Base SAS files.&lt;BR /&gt;&lt;BR /&gt;However your #3 is wrong, as it attempts to mix the 2 methods. Since a LIBNAME statement such as you show will ONLY point to SAS data in a physical location, the file extension sas7bdat is not required, and, as you found out, will not work. The only files that you would see with your LIBNAME statement would be the SAS data files in that physical location. If you want to use the file extension, then you need to focus on method 2. However, the LIBNAME method is superior. We show you the physical name method by way of comparison and to show you how easy, by comparison the 2 level LIB.DATASET method is.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 05 Oct 2020 01:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688812#M79617</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-10-05T01:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688818#M79618</link>
      <description>Thank you!&lt;BR /&gt;If I am understanding you correctly, then the first method worked because everything in a SAS library is already a SAS data set (it is of type sas7bdat or whatever other implicit types are allowed). The third method is redundant and causes the implied name to be something like storm_summary.sas7bdat.sas7bdat, which does not exist. Is that a reasonable interpretation?&lt;BR /&gt;Dave (newbie)</description>
      <pubDate>Mon, 05 Oct 2020 02:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688818#M79618</guid>
      <dc:creator>SAS1246996</dc:creator>
      <dc:date>2020-10-05T02:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688861#M79621</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350702"&gt;@SAS1246996&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you!&lt;BR /&gt;If I am understanding you correctly, then the first method worked because everything in a SAS library is already a SAS data set (it is of type sas7bdat or whatever other implicit types are allowed). The third method is redundant and causes the implied name to be something like storm_summary.sas7bdat.sas7bdat, which does not exist. Is that a reasonable interpretation?&lt;BR /&gt;Dave (newbie)&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is not redundant, it just does not follow the syntax.&amp;nbsp; The normal syntax to reference a dataset is to use the libref and member name.&amp;nbsp; You can also just use the member name and SAS will use the default libref, which is normally WORK.&amp;nbsp; Adding a second period and another token does not follow the syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you reference a dataset by its physical filename you must use a quoted string that references the actual file. And on Unix you must use only lowercase letters in the member name. Note that you can leave off the extension of the filename when referencing the dataset this way and SAS will use the default extension (currently sas7bdat) when looking for or creating the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 12:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/688861#M79621</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-10-05T12:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: File Path does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/706889#M79972</link>
      <description>&lt;P&gt;thank you this method really works the best! thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 06:40:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Path-does-not-exist/m-p/706889#M79972</guid>
      <dc:creator>Fanzeng</dc:creator>
      <dc:date>2020-12-18T06:40:36Z</dc:date>
    </item>
  </channel>
</rss>

