<?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 Error FILENAME REFFILE  + PROC IMPORT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754897#M238154</link>
    <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a program that worked very well in SAS Unniversity edition, but now in SAS onDemand for academics it no longer works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I send some parameters to the macro and when the macro variables are concatenated to form the path of the file in some mysterious way a "//" is added to the path so the file cannot be found.&lt;/P&gt;&lt;P&gt;I show you the code and the error of the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Source&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro import_emitidas_xls(rfc,anio,mes);

FILENAME REFFILE "/home/u58941115/cont/pmfecu/entradas/&amp;amp;rfc._Emitidas_&amp;amp;anio._&amp;amp;mes..xlsx";

PROC IMPORT DATAFILE=REFFILE
DBMS=XLSX
OUT=WORK.&amp;amp;rfc._Emitidas_&amp;amp;anio._&amp;amp;mes ;

GETNAMES=YES;
SHEET="XML";
RUN;

%mend import_emitidas_xls;

%let rfc= XBG1311088L6;
%let anio=2021;
%let mes= 01;

%import_emitidas_xls(&amp;amp;rfc,&amp;amp;anio,&amp;amp;mes);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Log&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; ERROR: Physical file does not exist, /home/u58941115/cont/pmfecu/entradas&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;//&lt;/STRONG&gt;&lt;/FONT&gt;XBG1311088L6_Emitidas_2021_01.
 NOTE: The SAS System stopped processing this step because of errors.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 01:38:04 GMT</pubDate>
    <dc:creator>JuanEstebanBlan</dc:creator>
    <dc:date>2021-07-19T01:38:04Z</dc:date>
    <item>
      <title>Error FILENAME REFFILE  + PROC IMPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754897#M238154</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a program that worked very well in SAS Unniversity edition, but now in SAS onDemand for academics it no longer works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I send some parameters to the macro and when the macro variables are concatenated to form the path of the file in some mysterious way a "//" is added to the path so the file cannot be found.&lt;/P&gt;&lt;P&gt;I show you the code and the error of the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Source&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro import_emitidas_xls(rfc,anio,mes);

FILENAME REFFILE "/home/u58941115/cont/pmfecu/entradas/&amp;amp;rfc._Emitidas_&amp;amp;anio._&amp;amp;mes..xlsx";

PROC IMPORT DATAFILE=REFFILE
DBMS=XLSX
OUT=WORK.&amp;amp;rfc._Emitidas_&amp;amp;anio._&amp;amp;mes ;

GETNAMES=YES;
SHEET="XML";
RUN;

%mend import_emitidas_xls;

%let rfc= XBG1311088L6;
%let anio=2021;
%let mes= 01;

%import_emitidas_xls(&amp;amp;rfc,&amp;amp;anio,&amp;amp;mes);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Log&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; ERROR: Physical file does not exist, /home/u58941115/cont/pmfecu/entradas&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;//&lt;/STRONG&gt;&lt;/FONT&gt;XBG1311088L6_Emitidas_2021_01.
 NOTE: The SAS System stopped processing this step because of errors.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 01:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754897#M238154</guid>
      <dc:creator>JuanEstebanBlan</dc:creator>
      <dc:date>2021-07-19T01:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error FILENAME REFFILE  + PROC IMPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754901#M238155</link>
      <description>&lt;P&gt;One slash is added, not two.&lt;/P&gt;
&lt;P&gt;The code shown should not generate this error.&lt;/P&gt;
&lt;P&gt;Please turn on option MPRINT and show us the full log report created by this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 04:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754901#M238155</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-07-19T04:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error FILENAME REFFILE  + PROC IMPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754912#M238162</link>
      <description>&lt;P&gt;Step 1 of macro development: start with working non-macro&amp;nbsp; code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename reffile "/home/u58941115/cont/pmfecu/entradas/XBG1311088L6_Emitidas_2021_01.xlsx";

proc import
  datafile=reffile
  dbms=xlsx
  out=WORK.XBG1311088L6_Emitidas_2021_01
  replace
;
getnames=yes;
sheet="XML";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Once this works, proceed from there.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 06:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/754912#M238162</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-19T06:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error FILENAME REFFILE  + PROC IMPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/755051#M238210</link>
      <description>&lt;P&gt;You're absolutely right Kurt. The error is in the name of the physical file. The code had no problems. I got caught up in the LOG message and thought that by forming the filename with the macro variables I was adding a "/" in some strange way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your recommendation!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 17:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-FILENAME-REFFILE-PROC-IMPORT/m-p/755051#M238210</guid>
      <dc:creator>JuanEstebanBlan</dc:creator>
      <dc:date>2021-07-19T17:15:58Z</dc:date>
    </item>
  </channel>
</rss>

