DATA Step, Macro, Functions and more

how to do winzip files in rsubmit

Reply
N/A
Posts: 0

how to do winzip files in rsubmit

I have issue to run winZip to zip files by using rsubmit. Local run for winzip works. But it didn't work for rsumbit.

options comamid=tcp;
%let r_server = xxxxx 7551;
options remote= r_server;
signon r_server;
rsubmit;
Options noxwait noxsync;
filename foo pipe '"C:\Program Files\WinZip\WINZIP32.EXE" -a \\somepath\test.zip \\somepath\test.txt ';
data _null_;
infile foo; input;
put _infile_;
run;
endrsubmit;

No zip file generated.

Could you kindly help to solve this problem?

Thanks.
Respected Advisor
Posts: 3,893

Re: how to do winzip files in rsubmit

Is Winzip on the server under the path C:\Program Files\WinZip\WINZIP32.EXE?
I assume that's the problem here.
Regards
Patrick
N/A
Posts: 0

Re: how to do winzip files in rsubmit

yes,

The path is correct.

I also checked the program list in remote server. The winzip32.exe was launched. But no zip file generated and the winzip32.exe ran forever....

Did you know what is the issue?

Thanks.
Respected Advisor
Posts: 3,893

Re: how to do winzip files in rsubmit

Hi Liwe

Running your code on my local machine I encountered the following:
1. I got a prompt from WinZip requesting me to do something (click buttons)
2. I got an error if the zip directory didn't exist already.

I assume that WinZip on your server is also waiting for some user input (only you don't see the prompt...) - and then of course it's waiting and waiting and...

Have a look at the following paper: http://www.lexjansen.com/phuse/2006/cc/cc01.pdf
There is also a link in it with two macros for zipping and unzipping.

What's important: You need for command-line mode two add-ons from WinZip: WZZIP and WZUNZIP. They can be downloaded for free.
In your code you must then call WZZIP instead of WinZip - but that's all explained in the paper under the link I've sent you.

HTH
Patrick
Ask a Question
Discussion stats
  • 3 replies
  • 147 views
  • 0 likes
  • 2 in conversation