Date: Mon, 21 Nov 2005 20:59:36 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: Input Files listed in Dataset
In-Reply-To: <1132606289.936225.116130@g49g2000cwa.googlegroups.com>
Content-Type: text/plain; format=flowed
J~B,
Look up 'filevar' should do exactly what you need with no macro's .
Toby Dunn
From: J - B <jbalint@GMAIL.COM>
Reply-To: J - B <jbalint@GMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Input Files listed in Dataset
Date: Mon, 21 Nov 2005 12:51:29 -0800
Hi guys, I am trying to figure out how to input a list of files from a
dataset. Something like this:
data All_Combined;
set File_List;
call symput("My_File", Filename);
do until(infend);
infile "&My_File" end = infend;
input x y z;
output;
end;
However, I'm not having much luck with it. The first part is that the
infile doesn't accept the macro variable when symput is right before
it, so I need a way to get the filename from the variable to be used
with the infile statement.
The second problem is that even when I put a static filename in, it
ends after reading the first file.
Any ideas would be appreciated. Thanks.
Jess