<?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: Import multiple .xlsx files WITHOUT using &amp;quot;pipe&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269432#M53376</link>
    <description>&lt;P&gt;I'm using SAS EG 6.1 (64 bit)&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2016 13:53:23 GMT</pubDate>
    <dc:creator>laneylaners</dc:creator>
    <dc:date>2016-05-10T13:53:23Z</dc:date>
    <item>
      <title>Import multiple .xlsx files WITHOUT using "pipe"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269281#M53341</link>
      <description>&lt;P&gt;I had to switch servers I was using at work, and the new one "doesn't have SAS/CONNECT spawner running on it" per our SAS administrator.&amp;nbsp; so now i cannot use an old code that had "pipe" in it to import a whole bunch of excel files in one swoop.&amp;nbsp; they don't have to be appended, but i would like each one saved as it's own dataset.&amp;nbsp; is there anyway to do this WITHOUT using "pipe"?&amp;nbsp; everything i've looked for online doesn't have the output i want as an option.&amp;nbsp; i'm using SAS EG 6.1 (64 bit)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;old code below&lt;/U&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;filename indata pipe 'dir C:\Users\engacr\Documents\"My SAS Files"\9.4\200k_Cars\2015_Q1 /b ';&lt;BR /&gt;
data file_list;
length fname $90 in_name out_name $50;
infile indata truncover;
input fname $ 90.;
in_name=translate(scan(fname,1,'.'),'_','-');
out_name=cats('TEMP_',in_name); 
if upcase(scan(fname,-1,'.'))='XLSX';                                                                                                          
run;&lt;BR /&gt;
data _null_;
  set file_list end=last;
  call symputx(cats('dsn',_n_),in_name);
  call symputx(cats('outdsn',_n_),out_name);
  if last then call symputx('n',_n_);
run;

%macro test;
   %do i=1 %to &amp;amp;n;
   PROC IMPORT OUT= work.&amp;amp;&amp;amp;outdsn&amp;amp;i.
            DATAFILE= "C:\Users\engacr\Documents\My SAS Files\9.4\200k_Cars\2015_Q1\&amp;amp;&amp;amp;dsn&amp;amp;i...xlsx" 
            DBMS=EXCEL REPLACE;
     GETNAMES=YES;
     MIXED=YES;
     SCANTEXT=YES;
     USEDATE=YES;
     SCANTIME=YES;
	 DBDSOPTS= "DBTYPE=(pct_load='NUM(8)')";
RUN;
%end;
%mend;
%test

data work.combined;
length veh_type_um $20.;
set TEMP_:;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;excel files in folder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DTTX_342349.xlsx&lt;/P&gt;
&lt;P&gt;DTTX_389923.xlsx&lt;/P&gt;
&lt;P&gt;TTAX_346722.xlsx&lt;/P&gt;
&lt;P&gt;TTPX_981123.xlsx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and so forth&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;would like them to output as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DTTX_342349.sas7bdat&lt;/P&gt;
&lt;P&gt;DTTX_389923.sas7bdat&lt;/P&gt;
&lt;P&gt;TTAX_346722.sas7bdat&lt;/P&gt;
&lt;P&gt;TTPX_981123.sas7bdat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and can append them if necessary&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 13:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269281#M53341</guid>
      <dc:creator>laneylaners</dc:creator>
      <dc:date>2016-05-10T13:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Import multiple .xlsx files WITHOUT using "pipe"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269286#M53342</link>
      <description>&lt;P&gt;So the pipe command is used to create the list of files that are to be imported. &amp;nbsp;If you don't have pipe you'll have to find another way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that you can use filename functions for this, but I can't find a good reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's one example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Get-directory-listing-on-linux/m-p/209520/highlight/true#M51916" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Get-directory-listing-on-linux/m-p/209520/highlight/true#M51916&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 23:25:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269286#M53342</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-09T23:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Import multiple .xlsx files WITHOUT using "pipe"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269366#M53367</link>
      <description>&lt;P&gt;Filename pipe is not a feature of CONNECT, it is in base SAS.&lt;/P&gt;
&lt;P&gt;If you are using a workspace server, XCMD needs to be enabled in the server definition in the metadata.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 09:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269366#M53367</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-10T09:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Import multiple .xlsx files WITHOUT using "pipe"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269432#M53376</link>
      <description>&lt;P&gt;I'm using SAS EG 6.1 (64 bit)&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 13:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269432#M53376</guid>
      <dc:creator>laneylaners</dc:creator>
      <dc:date>2016-05-10T13:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Import multiple .xlsx files WITHOUT using "pipe"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269500#M53408</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/42545"&gt;@laneylaners&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I'm using SAS EG 6.1 (64 bit)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which is not really important in this context. Location and definition of the workspace server is important.&lt;/P&gt;
&lt;P&gt;Have you already tried to run your code, and what were the results (log) if you did?&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 16:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-multiple-xlsx-files-WITHOUT-using-quot-pipe-quot/m-p/269500#M53408</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-10T16:05:40Z</dc:date>
    </item>
  </channel>
</rss>

