The SAS Output Delivery System and reporting techniques

Zip files from SAS

Reply
N/A
Posts: 0

Zip files from SAS

Does anyone know how to zip files using SAS9 for windows.
We are using winzip. Thanks
N/A
Posts: 0

Re: Zip files from SAS

You can use the x followed by the unzip command you want to..

eg..

x 'zip test.zip *.txt';
N/A
Posts: 0

Re: Zip files from SAS

thanks Sameer, I tried your code and it opens the command prompt DOS window, and does nothing. Any idea?
N/A
Posts: 0

Re: Zip files from SAS

You may have to supply the path i.e.

c:\program files\winzip\zip.exe...

or whatever your executable is.

Find it with explorer first.
SAS Employee
Posts: 88

Re: Zip files from SAS

Try adding the path down to the directory where the WinZip application is installed. The below creates the zip file c:\zzz.zip with all of the .txt files in the directory. You can also use the FILENAME statement and PIPE device which is featured in an example on the SUPPORT.SAS.COM home page. This example unzips a file however.

x '"c:\program files\winzip\wzzip.exe" c:\zzz.zip *.txt';

http://support.sas.com/ctx/samples/index.jsp?sid=1584


Message was edited by: David@SAS at Apr 12, 2006 1:12 PM
Message was edited by: David@SAS at Apr 12, 2006 1:12 PM
Occasional Contributor
Posts: 10

Re: Zip files from SAS

You may also need to use the noxwait and noxsync options to avoid having to manually exit the command prompt upon completion of calling the unzip program.
N/A
Posts: 0

Re: Zip files from SAS

thank you all. This was exactly what I was looking for
Frequent Contributor
Posts: 102

Re: Zip files from SAS

For ZIPing under MVS, if you have PKZIP licensed, see

<>
Ask a Question
Discussion stats
  • 7 replies
  • 329 views
  • 0 likes
  • 4 in conversation