Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Open VMS FTP of Indexed file

 
Steve Pratt_1
Occasional Visitor

Open VMS FTP of Indexed file

I have an Indexed file (File Organization Indexed) that I need to FTP from one domain to another. Standard FTP results in a ASCII Sequential file on the receiving side.
10 REPLIES 10
Jim_McKinney
Honored Contributor

Re: Open VMS FTP of Indexed file

Back it up, zip the backup, binary transfer the zip and undo on the remote end - the stucture will be preserved.
Hoff
Honored Contributor

Re: Open VMS FTP of Indexed file

Assuming both domains are running VMS, and assuming that the VMS versions are V6.2 or later...

$ COPY /FTP /BINARY -
indexedfile.dat -
ftp.example.com"user password"::targetfilename.dat

If the remote domain is not VMS, then it's commonplace to have the metadata corrupted by the intervening systems, and the usual palliate is to protect the file using the zip tool with the "-V" switch.
Hoff
Honored Contributor

Re: Open VMS FTP of Indexed file

The zip metadata preservation works as well as that of BACKUP.

Put another way, please don't bother using BACKUP within a zip archive.

That is unnecessary (with the use of the zip "-V" switch), and BACKUP largely serves to makes zip work harder with its compression, and the nesting here also means that common tools on VMS and other platforms can't be used to pull the files out of the zip archive (without a whole lot more work), and it means that common tools can't index the contents of the archive, etc.
Ian Miller.
Honored Contributor

Re: Open VMS FTP of Indexed file

as long as you have a relatively recent version of zip/unzip then "-V" does the right thing
____________________
Purely Personal Opinion
Steve Pratt_1
Occasional Visitor

Re: Open VMS FTP of Indexed file

Can I get an example of the proper syntax for the zip/unzip of the Indexed file? Thanks!
Volker Halle
Honored Contributor

Re: Open VMS FTP of Indexed file

Steve,

it's that easy:

$ ZIP "-V" zipfile filename-of-indexed-file

This wil create a zipfile.ZIP file.

Then transfer the zipfile.zip file via FTP in binary mode.

$ UNZIP "-V" zipfile

Volker.
Hoff
Honored Contributor

Re: Open VMS FTP of Indexed file

Here's an introduction to zip and unzip for OpenVMS:

http://labs.hoffmanlabs.com/node/575

Pointers to tools, common options, etc.

At its simplest, this is the command that preserves the metadata:

zip "-V" archive.zip indexedfile.dat

Steven Schweda
Honored Contributor

Re: Open VMS FTP of Indexed file

> Can I get an example of the proper syntax
> for the zip/unzip of the Indexed file?

zip -h
unzip -h

"zip -V" pretty well covers the fancy part.


> $ ZIP "-V" zipfile filename-of-indexed-file

Ok.

> $ UNZIP "-V" zipfile

unzip -h

Someone should read the UnZip documentation.
"-V" does not mean the same thing for UnZip
as it does for Zip. If "zip -V" is used to
create an archive on a VMS system, then no
special UnZip option should be needed when
extracting files from that archive on a VMS
system. (Prove me wrong, if you can.)

And. of course, if your (unspecified) VMS
version is reasonably recent, and your Parse
Style is Extended, then you don't need all
those quotation marks, either. (But they are
always safe to use.)

Standard caution:
Zip 3.0 and UnZip 6.0 are the current
released versions. I'd avoid anything older.
(Even those still have some relatively
obscure bugs, which should be fixed in the
current or next beta kits.)

http://www.info-zip.org/
Hein van den Heuvel
Honored Contributor

Re: Open VMS FTP of Indexed file

As others mentioned. Use -V or backup first.
RTFH:
(Must quote upper-case options, like "-V", unless SET PROC/PARSE=EXTEND)

However, in the larger context of the question you may want to consider an other alternative.

You could convert the file to sequential first, and zip that up along with a (fresh) FDL file. Convert back to indeded on the other side.

Why?
- This only zips up real data bytes and not indxed file overhead such as indexes and record overhead.
- The intermediate file may be useful on other platforms notably if the data is text.

Why not?
- More steps
- Binary contents becomes tricky (Hmmm, I may have to Email SMS on an issue I had trying)
- Intermediate file may 'explode' if the RMS compression was very effective.

Hope this helps some.
Hein
Tom Wade_1
Occasional Advisor

Re: Open VMS FTP of Indexed file

Hopefully, your version of ZIP accepts sensible DCL command qualifiers as well as Unix hieroglyphs.

$ ZIP /VMS MYZIP MYZIP.FILE

No need to mess with double quotes or parse styles.