• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Zip file creation and problems unzipping

 
Donna Reschke
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the java.util.zip.ZipOutputStream to create a zip file. I store it on a server and then invoke a script file that ftp's this zip file to our mainframe environment where a COBOL program tries to unzip it with PKUnzip. Each time they try to unzip my zip file they get an "invalid zip archive" error. But I am able to unzip it with WinZip. Does anyone have any experience with this or know of anything I can do differently? I've put a code snippet of how I zip the text file below.
Thanks, Donna

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you certain that PKUnzip can handle Deflater.DEFAULT_COMPRESSION?

Here is a canonical example of how to create ZIP files.
 
Donna Reschke
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I ended up commenting out the "setLevel" instruction which I'm not sure if that was causing part of the problem or not. The real issue was that I wasn't specifying "binary" when I ftp'd the file to the mainframe. ONce I did that, the COBOL program was able to unzip the file.
Thanks!
Donna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic