FW: dynamically create a folder and a file

FW: dynamically create a folder and a file

Post by Terjeson, Ma » Sat, 12 Jan 2002 03:53:56



Are you talking about Excel creating files there or
having SAS create Excel files there or ???

If SAS, which method?    Export  or using DDE
within the datastep or ???

PS:  if you would ever have spaces in the pathname
or the filenames most any one of us here on sas-l
can give you an adjusted syntax for handling the
quoting on that.

-----Original Message-----

Sent: Thursday, January 10, 2002 10:48 AM


Subject: RE: dynamically create a folder and a file

hi, mark, thank you for the helpful answer. so the following create a folder

for me within sas:

options noxwait xsync;
x "mkdir d:\fyrun\&FOLDERNAME";

but what about creating an excel file under that newly generated folder?

-----Original Message-----

Sent: Thursday, January 10, 2002 1:38 PM

Subject: Re: dynamically create a folder and a file

Hi,

There are a couple different conmands to invoke
an operating system command to create a new
directory.  If you have spaces in the path or filename
you will have to handle the quoting a bit more or
pre-concatenate the string or both.......

    * macro variable loaded by whatever means..... ;
%let FOLDERNAME=FY01SALE;

    * The X command invokes an  ;
    * operating system command. ;
    * if you do not have spaces ;
    * in the path or filename.. ;
options noxwait xsync;
x "mkdir d:\fyrun\&FOLDERNAME";
    * of course this is a PC command ;
    * you would have to taylor it to ;
    * whatever environment you use.  ;

Hope this is helpful,
Mark Terjeson
Washington State Department of Social and Health Services
Division of Research and Data Analysis (RDA)

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

 
 
 

1. dynamically create a folder and a file

... ...
(codes here)
... ...

(when sas executes arriving this point, a macro variable FOLDERNAME will be
generated, and will be assigned a value, say, FY01SALE.)

my question is, at this point, how to, within sas, create a folder under
D:\FYRUN. the folder name is whatever the value of the macro variable
FOLDERNAME is, which in this case is FY01SALE. under the newly generated
folder, i also need to, again within sas, create a excel file. the file name
is again whatever the value of the macro variable FOLDERNAME is, which in
this case is FY01SALE.

anybody take this one?

_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com

2. what is rev aliasing

3. Fw: How to translate "\\server\alias\*****\file\" with $folder?

4. Request: Format.dat for Quantum ProDrive LPS 540

5. How to create a folder with the name "New Folder (x)"

6. Nero incd 2.0 problem

7. Creating zip file dynamically

8. print dynamically a text from the pdf file and hide text dynamically

9. Dynamically created PDF files

10. How to create a PDF bookmarking all the PDF files of a folder ?

11. FW: Creating a file IF....