|
Dear SAS-L-ers,
Terry He posted the following:
> I am trying to download several files in one folder on the
> server to my own laptop.
>
> I know I can use ftp software. When the files have been
> created, than I can use it. The problem is that the sas code
> is still running and the files haven't been created. When the
> files has been created, I need to compress it and then
> downlaod it. I am using the following code to do that.
>
> data server.a;
> b=1;
> run;
>
> data _null_;
> i = 0;
> dsname = "server.a";
> do until(i>120 or exist(dsname,"data"));
> a = sleep(10);
> i+1;
> end;
> run;
>
> x "compress a.sas7bdat";
>
> data _null_;
> a=sleep(15);
> run;
>
> proc download in=server out=laptop;
> select a;
> run;
>
> The problem is that the last downlaod procedure works well if
> the file is not compressed. It doesn't work if the file is
> compressed. Could I use some procedure like proc ftp?
>
> Any suggestions?
>
Terry, I would suggest an all-SAS solution. Try using the COMPRESS option to compress all of your SAS data sets. Then, download them en-mass via your PROC DOWNLOAD. That way, you don't have to futz with the SLEEP function and multiple DATA _NULL_'s. Give it a try and report back to the 'L promptly on Monday at 9:00am sharp:-)
Terry, best of luck in all of your SAS endeavors!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: MichaelRaithel@westat.com
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172
Author: The Complete Guide to SAS Indexes
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A candle looses nothing by lighting another candle. - Father James Keller
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|