Date: Tue, 14 Jun 2011 17:20:06 -0400
Reply-To: Arthur Tabachneck <art297@ROGERS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@ROGERS.COM>
Subject: Re: calling WinZip to zip output data from a SAS program
Ray,
The following paper shows an example of zipping files, using winzip with the
same kind of command structure as shown in your current macro:
http://www.lexjansen.com/wuss/2009/cod/COD-Walsh.pdf
HTH,
Art
------
On Tue, 14 Jun 2011 14:56:31 -0500, Burton, Ray <Ray.Burton@ACS-INC.COM>
wrote:
>Hi all,
>
>I have a macro I inherited that will unzip files.
>
>I need to develop a macro to zip output files. Unfortunately, I have
absolutely no experience with WinZip command line coding.
>
>Here is the macro that does the unzipping.
>
>%macro unzip_input;
>options macrogen symbolgen XWAIT;
> %let ctime = %sysfunc(compress(%sysfunc(time(),time.),':'));
> %let ziploc = ""C:\program files\winzip\wzunzip.exe"";
> %let zipfile = ""&pathname.\&direct.\DATA\NON_SAS\&InputDSN..ZIP"";
> %let zipout = ""&pathname.\&direct.\DATA\NON_SAS"";
> %let zipopt = -d -o;
> %let zipcmd = &ziploc &zipopt &zipfile &zipout;
> systask command "&zipcmd" taskname=ziptask status=zipstat;
> waitfor ziptask;
> %put &zipstat=;
>run;
>%mend unzip_input;
>
>Can anyone help me rewrite this to zip SAS datasets rather than unzipping
the input data?
>
>Ray Burton
>VAMMIS Team: SAS Admin
>Government Healthcare Solutions
>Virginia MMIS Application Support
>Affiliated Computer Services, Inc., A Xerox Company
>Richmond, VA 23225
|