<?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: &amp;quot;Physical file does not exist&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/682041#M206422</link>
    <description>&lt;A href="https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-Can-t-Output-File-to-SharePoint/m-p/682033" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-Can-t-Output-File-to-SharePoint/m-p/682033&lt;/A&gt;</description>
    <pubDate>Mon, 07 Sep 2020 16:23:09 GMT</pubDate>
    <dc:creator>cgates</dc:creator>
    <dc:date>2020-09-07T16:23:09Z</dc:date>
    <item>
      <title>"Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291759#M60451</link>
      <description>&lt;P&gt;I am running&amp;nbsp;a macro to export using proc print an excel file to a sharepoint site that's mapped to my Y: drive. When I run the program I get no errors, but when it's run in windows batch mode (i.e. command line) I get "&lt;/P&gt;&lt;P&gt;ERROR: Physical file does not exist, Z:\Data_local\my_data\Y:\data\blah.xlsx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure why SAS adds the Z drive reference to my filename IN THIS CODE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ODS EXCEL FILE = 'Y:\data\blah.xlsx';&lt;/P&gt;&lt;P&gt;proc print noobs data = mydata (where = (id=&amp;amp;id);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ODS EXCEL FILE CLOSE;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 19:35:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291759#M60451</guid>
      <dc:creator>vargo032</dc:creator>
      <dc:date>2016-08-15T19:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291761#M60452</link>
      <description>&lt;P&gt;I don't know that SAS would change the directory...make sure you're running the correct code. Add a PUT statement into your code and then call from batch to see if it appears.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 19:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291761#M60452</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-15T19:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291764#M60454</link>
      <description>&lt;P&gt;Okay, added MLOGIC and MPRINT as well as PUT and it's not resolving the file but this time it's not showing the Z shared drive...weird:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Physical file does not exist, 'Y:\data\blah.xlsx'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a previous warning:&lt;/P&gt;&lt;P&gt;WARNING: Data too long for column "DDMM"; truncated to 97 characters to fit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I know DDMM is only 4 characters because that's the lenght of the data, and i'm using strip().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another co-worker suggested using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;style(header)={width=100%}  style(data)={width=100%} ;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to stop data truncation and clear the warning, but seems to still be an issue, and maybe the root cause of the 'file not exist' issue....?&lt;/P&gt;&lt;P&gt;Also tried clearing libname, filename and using a macro variable instead of the Y: drive to connect. All three do not resolve the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 19:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291764#M60454</guid>
      <dc:creator>vargo032</dc:creator>
      <dc:date>2016-08-15T19:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291766#M60456</link>
      <description>&lt;P&gt;Are you closing ODS listing while running this code?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291766#M60456</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-15T20:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291770#M60457</link>
      <description>&lt;P&gt;Yes, later on in the program for an email macro but that's seperate of the export&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a condensed version of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%put ***&amp;amp;records***;

options mprint mlogic;
%macro export_macro;

%if &amp;amp;records ne "" %then %do;
%let i=1;
%do %while ( &amp;amp;i&amp;lt;=&amp;amp;records);

data _null_;
set list_id_ (where =(list_id=&amp;amp;i));
call symput ('file_id',strip(file_id)) ;
run;

%put ***&amp;amp;file_id*** ;
ods excel file="Y:\data\blah_&amp;amp;file_id..xlsx" 
		  title = "&amp;amp;file_id._1" 
;
proc print noobs data=current_reports (where = (file_id="&amp;amp;file_id" style(header)={width=100%} style(data)={width=100%};
run;
ods excel close;

%end;
%let i= %eval(&amp;amp;i+1);
%end; %end;
%mend;
%export_macro;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291770#M60457</guid>
      <dc:creator>vargo032</dc:creator>
      <dc:date>2016-08-15T20:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291772#M60459</link>
      <description>&lt;P&gt;I don't see ODS LISTING CLOSE in that code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding that before your proc print&amp;nbsp;and turning it on afterwards. I think that's generating the error/warning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS LISTING CLOSE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS LISTING;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291772#M60459</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-15T20:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291775#M60461</link>
      <description>Thank you! That got rid of the data truncation but still having issues with the file output, only in batch mode.&lt;BR /&gt;Same error as before.&lt;BR /&gt;I added a loop to try running a second time:&lt;BR /&gt;If &amp;amp;syserr &amp;gt; 0&lt;BR /&gt;but that returns false, which makes no sense!&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Aug 2016 21:05:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291775#M60461</guid>
      <dc:creator>vargo032</dc:creator>
      <dc:date>2016-08-15T21:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291778#M60463</link>
      <description>&lt;P&gt;When you run in batch, what user ID is being used?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't run in batch so not sure, but this is a common issue I've heard.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The account being used needs to have same permissions and set up as the account you're using for tests.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 21:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291778#M60463</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-15T21:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291780#M60465</link>
      <description>&lt;P&gt;it would make sense if there's a difference between my SAS config file and the PC that runs the batch. Using windows authentication if that helps. I'll take a look at the system info to find any differences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 21:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291780#M60465</guid>
      <dc:creator>vargo032</dc:creator>
      <dc:date>2016-08-15T21:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291833#M60481</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just a small point, your code can be simply resolved to:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set list_id;
  call execute(cats('ods excel file="y:\data\blah_',file_id,'.xlsx" title="',file_id,'";
                     proc print noosb data=current_reports (where=(file_id="',file_id,'"; run;
                     ods excel close;'));
run;
&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2016 09:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/291833#M60481</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-16T09:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/680586#M205707</link>
      <description>Did you every find a solution? I'm having the exact same issue.</description>
      <pubDate>Tue, 01 Sep 2020 00:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/680586#M205707</guid>
      <dc:creator>cgates</dc:creator>
      <dc:date>2020-09-01T00:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/680590#M205709</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/256958"&gt;@cgates&lt;/a&gt;&amp;nbsp; - Adding to old posts is discouraged on the SAS Community. You will get a better response if you create a new post (Please post your SAS log). You can always add a link to an old post if you think it would be helpful. While you may be getting the same issue there is no guarantee the cause and fix is the same.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 01:13:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/680590#M205709</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-09-01T01:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/680610#M205720</link>
      <description>&lt;P&gt;Please post your question in a new thread. Post your log (using the proper subwindows as mentioned in the welcome mail), give information about your SAS environment.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 04:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/680610#M205720</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-01T04:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/682041#M206422</link>
      <description>&lt;A href="https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-Can-t-Output-File-to-SharePoint/m-p/682033" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-Can-t-Output-File-to-SharePoint/m-p/682033&lt;/A&gt;</description>
      <pubDate>Mon, 07 Sep 2020 16:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/682041#M206422</guid>
      <dc:creator>cgates</dc:creator>
      <dc:date>2020-09-07T16:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: "Physical file does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/682042#M206423</link>
      <description>New post: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-Can-t-Output-File-to-SharePoint/m-p/682033" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-Can-t-Output-File-to-SharePoint/m-p/682033&lt;/A&gt;</description>
      <pubDate>Mon, 07 Sep 2020 16:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-Physical-file-does-not-exist-quot/m-p/682042#M206423</guid>
      <dc:creator>cgates</dc:creator>
      <dc:date>2020-09-07T16:23:42Z</dc:date>
    </item>
  </channel>
</rss>

