| Date: | Wed, 14 Dec 2005 22:18:22 -0500 |
| Reply-To: | "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM> |
| Subject: | Re: Input multiple raw file |
|---|
On Wed, 14 Dec 2005 13:46:12 -0800, smartie_zhuo@HOTMAIL.COM wrote:
>Hi There
>I use filevar to read multiple external files,but I found when my
>external file name include blank,for example "abc x y.txt " then SAS
>doesn't recognize it.If I removed the blank and changed the file name
>to "abcxy.txt" then SAS can read it.I want to know is there any way to
>input multiple file whose file name include blank.
>
>Thanks
Works for me, using Version 9.1.3 SP3. Demo:
data _null_;
file 'w and x.dat'; put 'w'; put 'x';
file 'y and z.dat'; put 'y'; put 'z';
run;
data _null_;
do inf = 'w and x.dat', 'y and z.dat';
infile dummy filevar=inf end=done;
done = 0;
do until (done);
input letter $;
put letter=;
end;
end;
stop;
run;
Result:
NOTE: The infile DUMMY is:
File Name=C:\Documents and Settings\HS\w and x.dat,
RECFM=V,LRECL=256
letter=w
letter=x
NOTE: The infile DUMMY is:
File Name=C:\Documents and Settings\HS\y and z.dat,
RECFM=V,LRECL=256
letter=y
letter=z
There may be a problem in the way you are forming or acquiring values for
you FILEVAR= variable.
|