BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Does anyone know how to zip files using SAS9 for windows.
We are using winzip. Thanks
7 REPLIES 7
deleted_user
Not applicable
You can use the x followed by the unzip command you want to..

eg..

x 'zip test.zip *.txt';
deleted_user
Not applicable
thanks Sameer, I tried your code and it opens the command prompt DOS window, and does nothing. Any idea?
deleted_user
Not applicable
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.
Chevell_sas
SAS Employee
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
mlamias
Fluorite | Level 6
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.
deleted_user
Not applicable
thank you all. This was exactly what I was looking for
JackHamilton
Lapis Lazuli | Level 10
For ZIPing under MVS, if you have PKZIP licensed, see

<>

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1271 views
  • 0 likes
  • 4 in conversation