| Date: | Wed, 20 Mar 1996 10:03:04 -0800 |
| Reply-To: | Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM> |
| Organization: | Cary Consulting Services |
| Subject: | Re: SAS and DOS files |
|---|
Andrew James Llwellyn Cary wrote:
>
> matt harned wrote:
> >
> > I'd like to have SAS read the contents of a dos directory and load the
> > resulting file names into ?? an array and use those filenames for later
> > processing. I thought I might set up a loop so that a filename is returned
on
> > each iteration and then assigned to a macro variable which can be used in a
> > data step. However, I've noticed a lack of dos function calls in sas (maybe
I
> > have'nt looked close enough) though. Is there any hope?? I really need
this.
> >
> > Thanks for any and all help!!
> >
> > Matt HarnedSince I posted the message below, a North Carolinian SASbird,
showed me
an even slicker way to do this using the PIPE option on a filename
command:
filename foo pipe 'dir /b';
data a;
length name $40;
infile foo;
input name;
proc print; run;
This approach also elimiates the need for a NOXWAIT option...
And I just though piping was something that involved either bagpipes or
unix... Silly me.
AJL Cary
> > Promega Corp.
>
> Try the X command
>
> X 'DIR c:/fred>dir.dat';
>
> or in a data step
>
> Try the CALL SYSTEM subroutine
>
> ... CALL SYSTEM('DIR c:\fred>dir.dat');...
>
> use the OPTIONS NOXWAIT ; before you issue either of these commands.
> --
> Andrew J. L. Cary | I Reckon that the Opinions
> Senior Curmudgeon | expressed here DO represent
> Cary Consulting Services, Newark, CA | those of the management of
> ajlcary@ix.netcom.com | Cary Consulting Services
--
Andrew J. L. Cary | I Reckon that the Opinions
Senior Curmudgeon | expressed here DO represent
Cary Consulting Services, Newark, CA | those of the management of
ajlcary@ix.netcom.com | Cary Consulting Services
|