Date: Fri, 21 Feb 2003 13:48:52 -0500
Reply-To: Kevin Viel <kviel@EMORY.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kevin Viel <kviel@EMORY.EDU>
Subject: Re: Make directory listing available as a macro variable
Content-Type: text/plain; charset="iso-8859-1"
There is a method for pipes but I do not have my code handy. I
never seems to remember it. However, I do remember some SCL functions
available to the data step:
length list $ 1000;
if dcnt>0 then
do i=1 to dcnt;
if index(rd, ".xls") then
if list=" " then list=rd || " * ";
else list=compbl(list) || trim(left(rd)) || " * " ;
call symput("XL", list);
Department of Epidemiology
Rollins School of Public Health
Atlanta, GA 30329
----- Original Message -----
From: "rpresley" <rpresley@GMCF.ORG>
Sent: Friday, February 21, 2003 12:35 PM
Subject: Make directory listing available as a macro variable
> SAS 8.2, Windows.
> We have directories such as c:\excel .
> I want to be able to include the names of the files in this directory into
> SAS macro variable so I can then use that macro variable in a program that
> imports all of the excel files in a directory. It looks like I might be
> able to use a pipe command to get the dir listing into a flat file but I
> have not figured this out yet.
> Any help would be appreciated.
> Rodney J. Presley, PhD
> Director of Data Analysis
> Georgia Medical Care Foundation
> 57 Executive Park South, NE
> suite 200
> Atlanta, GA 30329-2224
> 404-982-7592 fax