Operating System - OpenVMS
1824635 Members
4141 Online
109672 Solutions
New Discussion юеВ

OpenVMS Zip file sent to Unix, text file format corruped

 
SOLVED
Go to solution
John T. Farmer
Regular Advisor

OpenVMS Zip file sent to Unix, text file format corruped

Hello,

With the help of this forum, I was able to get zip (info zip 2.3) and unzip (info zip 5.50) running on our OpenVMS 7.2-1 Alpha.

Now, I'm trying to share a file with a remote Unix system and can't get the right zip command line options. I've tried -l, -ll and "-V". The "-V" is the only option that allows me to unzip on the Alpha and shows zero changes with Diff. However, on the Unix, they complain of various things.

Using zip -l causes the first record of the unzipped file to contain appended space and/or garbage at the end, making it longer than defined. Using "-V" causes a continuous stream record.

Seems using -ll works for the Unix recipient, but then I can not use the same zip back on VMS, unless maybe I convert it with an FDL.

Thoughts on what I might be doing wrong?

Thanks,

John Farmer
john dot farmer at genworth dot com
9 REPLIES 9
Jim Lahman_1
Advisor

Re: OpenVMS Zip file sent to Unix, text file format corruped

>>Now, I'm trying to share a file with a >>remote Unix system and can't get the >>right zip command line options. I've >>tried -l, -ll and "-V". The "-V" is the >>only option that allows me to unzip on >>the Alpha and shows zero changes with >>Diff. However, on the Unix, they complain >>of various things.

Are you transferring the file with ftp? If so, are you using a binary format? Don't use the default,which is auto, meaning that ftp will determine to use either binary or ascii.

>>Seems using -ll works for the Unix >>recipient, but then I can not use the >>same zip back on VMS, unless maybe I >>convert it with an FDL

Are you placing this file on an ODS-5 formatted disk? If not, make sure the file name of the zip file is not Unix-friendly but VMS-friendly.

Cheers,

Jim


Cheers!
Robert Gezelter
Honored Contributor

Re: OpenVMS Zip file sent to Unix, text file format corruped

John,

Before we go any further, please do a DIRECTORY/FULL on the OpenVMS system and post the results here.

Transferring a ZIP archive will require that you use the BINARY option in FTP. The ZIP "-V" option stores the OpenVMS file attributes, which the OpenVMS version of UNZIP understands, but are not useful (or worse than not useful) on an *IX system.

- Bob Gezelter, http://www.rlgsc.com
Steven Schweda
Honored Contributor

Re: OpenVMS Zip file sent to Unix, text file format corruped

> [...] "-V" [...] on the Unix, they complain
> of various things.

I'll bet that they see a bunch of NUL
characters (up to 16K of them) at the end
of a file.

> Thoughts on what I might be doing wrong?

I may have suggested this before, but it's
still true. Try _current_ versions of Zip
and UnZip (especially Zip, in this case).
Zip 2.3 with "-V" creates a defective
archive, but its defects are noticed only on
a non-VMS system.

The problem was solved in Zip 2.31 (and is
still solved in the current released version,
2.32, and is expected to stay solved in all
future versions).

http://www.info-zip.org/
http://www.info-zip.org/UnZip.html
http://www.info-zip.org/Zip.html

Note that Zip after 2.3 and UnZip after 5.50
include some VMS-specific I/O speed
improvements, too.

Note that for maximum portability, starting
with text files in Stream_LF format is a very
good idea. I'd expect Zip "-l" and "-ll" to
be pretty useless in your situation, but it
may depend on the file format(s). UnZip has
a "-a" option (also "-aa"), which might be
helpful.

If you still have trouble with "Zip -V"
(using Zip 2.32), please supply a DIRE /FULL
for the original file, and an "od -h" (or
whatever) for a few lines of the resulting
files when unpacked on the UNIX system.
John T. Farmer
Regular Advisor

Re: OpenVMS Zip file sent to Unix, text file format corruped

Yes, I was using binary transfer mode in ftp. I am running Zip 2.3 and Unzip 5.5. Because I don't have a C compiler, I was trying to use binary version of these utils. Since installing this, I was told about the HP Test Drive systems, so I will try to make a new set using current source on a 7.2 OpenVMS Alpha machine. Can't get connected from work, so will try from home lab (corporate has our network so locked down, it is not even funny... unless you enjoy that sort of thing).

Thanks,

John
Steven Schweda
Honored Contributor

Re: OpenVMS Zip file sent to Unix, text file format corruped

> [...] I don't have a C compiler [...]

Ok, but there are kits with VMS binaries
available, too:

http://www.info-zip.org/Zip.html#VMS

For example:

http://vms.process.com/ftp/vms-freeware/fileserv/

The "ZIP.ZIP" kit there seems to offer enough
stuff to allow linking executables back as
far as VMS Alpha V6.2, so that should be good
(well, old) enough for V7.2.

If the executables run at all, "zip -v" and
"unzip -v" should admit which compiler/OS
combination was used to make them. (Exotic
build options can be used to accomodate old
VMS C RTL capabilities, too, so even if it
says something like:

Compiled with DEC C V6.2-003 for OpenVMS (V7.3-2 Alpha) on Jun 26 2006.

if the LINK works, it should be ok.

If nothing works, and if you can't find a
better offer, I may still have a disk with
V7.2 in a closet somewhere, so on a bad day
I could probably build the stuff on a V7.2
system, but I'd expect the kit from
process.com to do the job.
Steven Schweda
Honored Contributor

Re: OpenVMS Zip file sent to Unix, text file format corruped

> I was told about the HP Test Drive systems,
> so I will try to make a new set using
> current source on a 7.2 OpenVMS Alpha
> machine.

At:

http://www.testdrive.hp.com/current.shtml

I see V7.3-2 and V8.2 on Alpha. VMS V7.2
dates back to around 1999, so it's less
popular now than it once was.
Stanley F Quayle
Valued Contributor

Re: OpenVMS Zip file sent to Unix, text file format corruped

Is the ZIP file corrupted, or are the ASCII files inside corrupted?

Your initial message makes me think that your .ZIP is fine, but the Unix guys can't read the ASCII files -- because they're not ASCII.

Remember. only the STMLF file format is what Unix would consider ASCII. Other text files in VARIABLE format need to be converted to STMLF on VMS, or by a C program on Unix. If they're seeing 2 bytes of "garbage" at the beginning of each line of text, with no CR or LF between, that's your problem.

http://www.stanq.com/charon-vax.html
Steven Schweda
Honored Contributor
Solution

Re: OpenVMS Zip file sent to Unix, text file format corruped

> Other text files in VARIABLE format need to
> be converted to STMLF on VMS, or by a C
> program on Unix.

UnZip's "-a" option should be able to repair
"Record format: Variable length" files, but
the "-V" option in Zip 2.3 causes more
trouble than you might expect. To review the
whole, depressing original (two-year-old)
discussion, see:

http://groups.google.com/group/comp.os.vms/browse_thread/thread/dc6b4e342d0e1944/e72976a8e7827dc8
John T. Farmer
Regular Advisor

Re: OpenVMS Zip file sent to Unix, text file format corruped

I will revisit the ZIP/UNZIP issues once our OpenVMS has been upgraded to current version. This will hopefully resolve some of the issues based on recommendations made here.

Thanks,

John