<?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: Using a Wildcard in Filename Statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635850#M188840</link>
    <description>Note that using the wildcard I will be defining the same file, just without the Date Time portion of the name.  Only one file will ever qualify even tho I'm using the * wildcard.</description>
    <pubDate>Mon, 30 Mar 2020 15:32:20 GMT</pubDate>
    <dc:creator>buechler66</dc:creator>
    <dc:date>2020-03-30T15:32:20Z</dc:date>
    <item>
      <title>Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635849#M188839</link>
      <description>&lt;P&gt;Hi.&amp;nbsp; I have a Filename Statement that I need to use a wildcard in (e.g. *).&amp;nbsp; The first commented out Filename Statement works fine, but when I update the code to use the uncommented Filename Statement which includes the * wildcard the code errors out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions on how I can correct this issue?&amp;nbsp; I'd appreciate any help.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*FILENAME Site "'C:\Users\SteveBuechler\Box Sync\IBM\USPS\In Scope Contracts For Site\Parsed Output_Erie 0330_1000.xlsx'";*/

FILENAME Site "'C:\Users\SteveBuechler\Box Sync\IBM\USPS\In Scope Contracts For Site\Parsed Output_Erie*.xlsx'";

PROC IMPORT OUT= Sites&amp;amp;site DATAFILE= Site
            DBMS=XLSX REPLACE;
     SHEET="Trips";
     GETNAMES=YES;
RUN;

ERROR: Physical file does not exist, C:\\U.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.02 seconds
      cpu time            0.03 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635849#M188839</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2020-03-30T15:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635850#M188840</link>
      <description>Note that using the wildcard I will be defining the same file, just without the Date Time portion of the name.  Only one file will ever qualify even tho I'm using the * wildcard.</description>
      <pubDate>Mon, 30 Mar 2020 15:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635850#M188840</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2020-03-30T15:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635854#M188841</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79805"&gt;@buechler66&lt;/a&gt;&amp;nbsp; May I ask the reason you are having quotes within quotes?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Though I don't think that causes errors, but just asking. I would have thought the syntax is rather convenient to have&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME Site "C:\Users\SteveBuechler\Box Sync\IBM\USPS\In Scope Contracts For Site\Parsed Output_Erie*.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635854#M188841</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-30T15:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635858#M188842</link>
      <description>No reason, I've just been trying various syntax to see if I can get the *&lt;BR /&gt;wildcard to work.&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:41:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635858#M188842</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2020-03-30T15:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635861#M188843</link>
      <description>&lt;P&gt;Perhaps it is just that PROC IMPORT doesn't get it.&lt;/P&gt;
&lt;P&gt;Try finding the filename yourself first.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  length fname $256 ;
  infile "C:\Users\SteveBuechler\Box Sync\IBM\USPS\In Scope Contracts For Site\Parsed Output_Erie*.xlsx"
          obs=1 filename=fname
  ;
  input;
  call symputx('fname',fname);
run;

PROC IMPORT OUT= Sites&amp;amp;site DATAFILE= "&amp;amp;fname"
            DBMS=XLSX REPLACE
;
     SHEET="Trips";
     GETNAMES=YES;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635861#M188843</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-30T15:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635865#M188846</link>
      <description>&lt;P&gt;Is this a complete example? Typically you would not use a mix of double and single quotes in a filename as shown for a single input file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if your wildcard expansion results in two or more files then Proc Import isn't going to like it.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 16:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635865#M188846</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-30T16:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Wildcard in Filename Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635931#M188866</link>
      <description>Works like a charms.  Thanks for taking the time to help!</description>
      <pubDate>Mon, 30 Mar 2020 19:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-Wildcard-in-Filename-Statement/m-p/635931#M188866</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2020-03-30T19:05:10Z</dc:date>
    </item>
  </channel>
</rss>

