Date: Mon, 29 Aug 2005 16:24:58 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: reading similarly named files automatically
Depending upon the operating system you are on, you could incorporate
something like the following:
filename dirlist pipe "dir &dir2use.*.xml /B";
length dirname $70;
infile dirlist truncover;
input dirname &;
On Mon, 29 Aug 2005 11:54:15 -0600, Elizabeth Newsom
>I am hoping someone can look at the problem I'm having and tell me how I
>can (easily) fix it. Although this involves reading XML files, it's more
>question on how to read in a series of files, automatically.
>I am reading a bunch of XML files into SAS. Generally there's 1 file per
>day (yyyymmdd in the middle of the XML file name) except in this case on
>8/12/2005, where there are 3 files. Here's a sample of their names:
>I thought the following code would read them ALL in (you can ignore the
>libname test xml "path1/&filename..xml"
>* Many more lines of SAS code go here;
>%DO I=11 %to 14;
>But this code only reads ONE of the files from 8/12/2005 and then proceeds
>to read the 8/13/2005 file.
>Any way to fix this? It needs to be automatic because I'll be doing this
>basically on a monthly basis, so I want it automated.
>Thanks for any help,
>Clinical Research Unit
>Kaiser Permanente of Colorado
>CONFIDENTIAL AND PRIVILEGED: This communication contains information only
>for the use of the individual or entity to which it is addressed. If you
>are not the intended recipient or a KP employee responsible for delivering
>the communication to the intended recipient, please be aware that you are
>strictly prohibited from sharing, distributing or copying this
>If you have received this communication in error, please notify the
>individual who sent this immediately at the telephone number below to
>arrange the return or proper delivery of this document.