<?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: Unable to resolve UNC path of mapped drive while browsing files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248187#M46601</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I am using PC SAS and I want my code to resolve the UNC path so that I can get the correct absoulte path of the file location to store in my database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2016 08:05:40 GMT</pubDate>
    <dc:creator>Aditi24</dc:creator>
    <dc:date>2016-02-05T08:05:40Z</dc:date>
    <item>
      <title>Unable to resolve UNC path of mapped drive while browsing files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248180#M46595</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a small utility coded in SAS which is used to open and modify SAS files as per the needs of programmer. These SAS files are present on a network drive which could also be mapped to the local drive. The problem I am facing is, the UNC path of selected SAS file doesnt resolve but instead drive letter comes up in the absolute path of the file.&lt;/P&gt;
&lt;P&gt;For eg. If I've mapped&lt;EM&gt; &lt;STRONG&gt;\\mrllogon\system\phases\tools&lt;/STRONG&gt;&lt;/EM&gt; to drive W, I am getting path as &lt;EM&gt;&lt;STRONG&gt;W:\adhoc\programming instead of&amp;nbsp;\\mrllogon\system\phases\tools\adhoc\programming.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please suggest a method to resolve this drive paths in Base&amp;nbsp;SAS.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 07:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248180#M46595</guid>
      <dc:creator>Aditi24</dc:creator>
      <dc:date>2016-02-05T07:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve UNC path of mapped drive while browsing files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248185#M46599</link>
      <description>&lt;P&gt;Where is Base SAS running? On your PC or on a remote server? If SAS is running on a remote server then the UNC path must be available there not on your PC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If SAS is running on your PC try the UNC path not the mapped drive first in Windows Explorer. If it works it will also work in SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 07:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248185#M46599</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-02-05T07:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve UNC path of mapped drive while browsing files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248187#M46601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I am using PC SAS and I want my code to resolve the UNC path so that I can get the correct absoulte path of the file location to store in my database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 08:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248187#M46601</guid>
      <dc:creator>Aditi24</dc:creator>
      <dc:date>2016-02-05T08:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve UNC path of mapped drive while browsing files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248191#M46603</link>
      <description>&lt;P&gt;In that case you should be able to assign the UNC directly like this, as long as it also works in Windows Explorer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname MyLib "&lt;EM&gt;&lt;STRONG&gt;\\mrllogon\system\phases\tools";&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 08:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248191#M46603</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-02-05T08:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve UNC path of mapped drive while browsing files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248211#M46609</link>
      <description>&lt;P&gt;How are you getting the file path of the file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;4    filename a "X:\Junk\a.txt";
5    filename b "\\myservser\Quentin\Junk\a.txt";
6
7    %put %sysfunc(pathname(a));
X:\Junk\a.txt
8    %put %sysfunc(pathname(b));
\\myservser\Quentin\Junk\a.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In my experience, pathname() will return a UNC if the fileref/libref was assigned with a UNC.&amp;nbsp; But if you have a fileref that was assigned with a mapped letter drive, and you want to convert that to a UNC, I don't know how to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Pause for Googling]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like Art Carpenter knows how to do it.&amp;nbsp; See %GetUNC in this paper: &lt;A href="http://www2.sas.com/proceedings/forum2008/023-2008.pdf" target="_self"&gt;http://www2.sas.com/proceedings/forum2008/023-2008.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 11:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248211#M46609</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-02-05T11:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve UNC path of mapped drive while browsing files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248816#M46762</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin﻿&lt;/a&gt;: I have tried this..but its not working for me. Seems like SAS is unable to identify the windows module&amp;nbsp;WNetGetConnectionA.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 07:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-UNC-path-of-mapped-drive-while-browsing-files/m-p/248816#M46762</guid>
      <dc:creator>Aditi24</dc:creator>
      <dc:date>2016-02-09T07:01:49Z</dc:date>
    </item>
  </channel>
</rss>

