|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
> > 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
> > have'nt looked close enough) though. Is there any hope?? I really need
> > Thanks for any and all help!!
> > Matt HarnedSince I posted the message below, a North Carolinian SASbird,
an even slicker way to do this using the PIPE option on a filename
filename foo pipe 'dir /b';
length name $40;
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.
> > 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
> firstname.lastname@example.org | 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
email@example.com | Cary Consulting Services