Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Urgent Help,  Zip using winzip and unzip at Sun OS

Posted on 2006-04-15
23
Medium Priority
?
1,101 Views
Last Modified: 2012-08-13
The zip file which is created using winzip is tranferred from Windows server using Connect Direct ftp s/w to Sun OS box. When I try to unizp using unzip command getting following error. Any help is greatly appreciated.

$ unzip -ou EAgentCommissionsReport200602Locl1.zip
Archive:  EAgentCommissionsReport200602Locl1.zip
error [EAgentCommissionsReport200602Locl1.zip]:  missing 211 bytes in zipfile
  (attempting to process anyway)
error [EAgentCommissionsReport200602Locl1.zip]:  attempt to seek before beginning of zipfile
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)
  (attempting to re-compensate)
file #1:  bad zipfile offset (local header sig):  274563
  (attempting to re-compensate)
file #1:  bad zipfile offset (local header sig):  274563
file #2:  bad zipfile offset (local header sig):  323116
file #3:  bad zipfile offset (local header sig):  899761
file #4:  bad zipfile offset (local header sig):  948527
file #5:  bad zipfile offset (local header sig):  1160108
file #6:  bad zipfile offset (local header sig):  1185826
0
Comment
Question by:ssunka01
  • 6
  • 4
  • 3
  • +5
22 Comments
 
LVL 93

Expert Comment

by:nobus
ID: 16459306
the first thing i would try is recreating the zip file, it can simply be bad.
Can you open it on the windows server?
0
 
LVL 1

Author Comment

by:ssunka01
ID: 16459310
Yes, I can open in windows sever .
0
 
LVL 1

Author Comment

by:ssunka01
ID: 16459320
I recreated couple of times . Here is my batch script which will create zipfile

@ECHO OFF
if "%1"==""  goto SYNTAX

wzzip -a+rP \Groups\AS400\HORIZONLINK\ExternalAgentCommissionsReport%1.zip \Groups\AS400\HORIZONLINK\Local_Dealer\%1      

wzzip -a+rP \Groups\AS400\HORIZONLINK\ExternalAgentCommissionsReport%1.zip \Groups\AS400\HORIZONLINK\National_Accounts\%1
If ErrorLevel 1 Goto ErrMsg
   Echo No Known Errors
Goto Exit
:ErrMsg
Echo ***SERIOUS ERROR DETECTED***      
:SYNTAX
   echo usage is "EAgentCommissionsReport_zip.bat YYYYMM"
:Exit
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 93

Expert Comment

by:nobus
ID: 16459413
did you try uninstalling the zip program on the sun server, and installing it again?
0
 
LVL 24

Expert Comment

by:Mohammed Hamada
ID: 16459541
Try Reinstall winzip, or try using different zipping wares.. such as Rar programs..
0
 
LVL 93

Expert Comment

by:nobus
ID: 16459628
or 7-zip :(free)   www.7-zip.org/
0
 
LVL 1

Author Comment

by:ssunka01
ID: 16459702
Any  more suggestions...
0
 
LVL 24

Expert Comment

by:Mohammed Hamada
ID: 16459775
>>> missing 211 bytes in zipfile.... have you tried to repair the archive??
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16459777
try to zip on Windows with :
wzzip -ef -r -P

then unzip on Solaris without options:
unzip your_archive.zip
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16459781
try to 'unzip archive.zip' without any options first...
0
 
LVL 16

Expert Comment

by:Joseph Nyaema
ID: 16460100
When zipping the file using winzip, try using normal compression.
0
 
LVL 1

Author Comment

by:ssunka01
ID: 16460358
I do not  know how to repair the file, Can you plese suggest how I can do that ,
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16460590
Did you transfer the file as binary?  I have seen these problems when the file was transfered as ASCII.
0
 
LVL 1

Author Comment

by:ssunka01
ID: 16460641
giltjr / Nopius

Your options are throwing light , I am working on these options, will let you know the results. Thanks for your suggestions.
0
 
LVL 24

Expert Comment

by:Mohammed Hamada
ID: 16460946
Check this trail version of zip repair...
http://www.ziprepair.com/
0
 
LVL 1

Author Comment

by:ssunka01
ID: 16461324
Finally able to unzip using unzip at sun os which are zipped at windows using winzip's command line interface command wzzip. zip file was transferred via Connect Direct s/w (Sterling Commerce product).  I am totally new to that s/w and involves some coding or configuration. The zip file was not transferring in binary mode. Finally with Connect Direct team member able to find to how to transfer binary mode.  

SUN OS unzip command unzipped the zip which was created in windows sucessfully without having any issue.

As a developer I do not have access to either to install or uninstall s/w on either machines. So I strict to the s/w which are avilable to use.  

Your suggestions are given options to keep on working so that I had many options to work on to resolve the issue
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16461397
Would strongly suggest that you work with the person that installed and setup Connect Direct.  I have used it, but I used it on an IBM mainframe under OS/390.  It was simple and easy for me, but I was also the person responsible for the install, setup, configuration, and setting up all of the jobs.  Plus the fact that I had used products like it before.

I would also suggest that you get the manuals, excuse me I mean documentation as most products don't ship real manuals any more.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 16462468
On the windows box, you should be using TAR, not zip, because that is the native zip format understood by unix and Sun OS.  So TAR the files, transfer them, then UNTAR them at the other end.  You can use WINRAR for this on the PC side, then TAR/unTAR on the Sun side./
0
 
LVL 32

Expert Comment

by:rsivanandan
ID: 16462976
Tar doesn't really compress, it only puts a wrapper on it. You could use tar and then zip it.

The files you zip on Windows can act weird when unzipped on *nix. First you need to run something like 'dos2unix' and the reverse as applicable.

I've faced a lot of problems with this while working with Cisco IPSMC/SecMon while testing 'em.

Cheers,
Rajesh
0
 
LVL 57

Accepted Solution

by:
giltjr earned 2000 total points
ID: 16464798
The author has found the solution, which is when tranfering non-text file cross platform you must use binary.

As rsivanadan stated, tar by itself does not compress, you can use gzip/zip with tar to get it compressed, but it would NOT have solved the problem.  Even if he had used tar +gzip/zip and still tranfered in ASCII he still would have had the same problem.
0
 
LVL 16

Expert Comment

by:Joseph Nyaema
ID: 16476347
Ahhh....
Giltjr, you are being modest.

Without your input on binary file transfer, ssunka01 would not be anywhere close to solving the issue.

you deserve the credit here.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16477767
That is up to ssunka01.

Binary was the trick (and sooner or later somebody else would have figured that out).  After working with customers doing file transfers cross platform (actually cross characters representation, EBCDIC to/from ASCII) for 20+ years binary vs. ASCII is the simplest problems to solve.

My last point was that it does not matter what he may have done to the file, as long as it was non-text, it must be transfered in binary or it gets hosed.  The TAR vs. ZIP is no argument at all.  Unix/Linux supports ZIP just as well as Windows supports TAR and TAR does NO compression (as rsivanandan stated) by itself.  It uses gzip, which happens to zip compatiable compression.  So using TAR will do nothing, but confuse the issue.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question