HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Indexed file corrupt

 
Antoniov.
Honored Contributor

Indexed file corrupt

I have examine an indexed file form my customer.
On remote host I made a zip file typing:
$ ZIP "-V" MYZIP MYFILE
I set "-V" option to save VMS attributes.
Then I downloaded file using CKERMIT binary mode (I could not use FTP for some reasons).
At end I unzipped file on my local host:
$ UNZIP -j MYZIP
I used -j because on my local host I have not same directory structure.
I'm stuck when I can't read then file. Usign DIR/FUL I'm amazed when I've seen:
Organization Seq (original was Indexe)
Record attrib streamLF (original was Variable)
and other wrong values.
As a dummy I typed
$ SET FILE MYFILE/ATTR=(ORG:IDX,RFM:VAR,MRS:350,LRL:0,RAT:CR)
but DIR/FUL now talk me invalid prolog.

With hands on my hairs I'm beating my head against the wall!
Please, can someone help me?

Antonio Vigliotti
Antonio Maria Vigliotti
13 REPLIES
Willem Grooters
Honored Contributor

Re: Indexed file corrupt

Antonio,

you should have unzipped with "-V" option as well. If you system dosn't have the same structure and ZIP contains one, UNZIP will create it. (-j will suppress this creation).
Normally, I would use the -j option of the ZIP side to prevent directory info in the ZIP file if I have files from one location and I know I don't have the structure (or don't care nor need to)

Willem
Willem Grooters
OpenVMS Developer & System Manager
Ian Miller.
Honored Contributor

Re: Indexed file corrupt

ensure also you are using current versions of zip/unzip as previous versions had issues.
____________________
Purely Personal Opinion
Martin Vorlaender
Honored Contributor

Re: Indexed file corrupt

Willem,

AFAIK, if a file is zipped with "-V", it should unzip okay on a VMS system (even without "-V").

I would tend to agree with Ian that this is an issue with zip/unzip versions.

cu,
Martin
Antoniov.
Honored Contributor

Re: Indexed file corrupt

Willem,
"-V" option for unzip means keep vms version number and there in not import for me.
Ian,
ZIP V2.3, UNZIP V5.42; HP site now has V2.3 for ZIP and V5.5 for UNZIP. I'll try with last unzip version.
I remember a thread with similar question where Martin link a new not official version. I'm searching for that 3D.

Antonio Vigliotti
Antonio Maria Vigliotti
John Gillings
Honored Contributor

Re: Indexed file corrupt

Antonio,

Personally I don't trust things like ZIP to get VMS file attributes right. I've seen so many questions like this one over the years. Too many things that can go wrong. Too easy to get the switches wrong.

I recommend using BACKUP to pack the files into a saveset, then ZIP or FTP or whatever you want to the saveset. At the other end, the file attributes of a BACKUP saveset can be restored easily using FIXSAVESET.COM (see below), no matter how badly they were damaged in transit.

FIXSAVESET.COM (beware of wrapping)

$IF p1.EQS."" THEN INQUIRE p1 "Save set file name ?"
$IF f$search(p1).EQS."" THEN EXIT
$WRITE SYS$OUTPUT " RFM was ", F$FILE(p1,"RFM"), ", MRS = ", -
F$FILE(p1,"MRS"), ", LRL = ", F$FILE(p1,"LRL"), "."
$SET FILE /ATTR=(RFM=FIX, MRS=44, LRL=44) 'p1 ! Easier for DCL
$OPEN/READ file 'p1
$READ file record
$CLOSE file
$mrs = F$CVSI(40*8,32,record)
$WRITE SYS$OUTPUT "Setting blocksize to: ",MRS
$SET FILE /ATTR=(RFM=FIX, MRS='mrs', LRL='mrs') 'p1
A crucible of informative mistakes
Martin Vorlaender
Honored Contributor

Re: Indexed file corrupt

Antonio,

Unzip 5.5 is relatively current. The current version (5.51, fixing a security issue) can be downladed from http://www.info-zip.org/UnZip.html#VMS

cu,
Martin
Hein van den Heuvel
Honored Contributor

Re: Indexed file corrupt


- My version of unzip (v5.0) also indicates that on the restore -V on;y affect versions.

- It is pretty clear that this is a procedural problem , not a system corruption, so we'd better find a better procedure huh? Still, if this was a single shot and all you have is the mangled file, then maybe we can help if you reply with a DUMP /BLOC=COUN=5 output attached as text file.

Two alternatives to to the -V on ZIP:
1) force the input file attribute to sequential 512 byte fixed length before the zip and reset the input (and the output after teh transfer) much like you already did.
2) wrap the file in a backup saveset before handing it over to zip.. Even if the backup saveset gets mangled, it will be easier to reset attributes on that.

Now, what problem are you really trying to solve?
Why are you trying to examing this indexed file?
For a performance/tuning problem?
If so, I have examined a few ( :-) over the years myself and studying ANAL/RMS/FDL output (as text file with with all the statistics) will be enough in 99% of the cases. Of course you'll need a keen eye for details, noticing when numbers 'do not line up'.
My VMS Freeware rms_tune_check may help you some more also in this space.

Good luck,
Hein.
Antoniov.
Honored Contributor

Re: Indexed file corrupt

Used UNZIP V5.5 downloaded from HP web site and made some test.
- File attrib are no changed, again lost indexed information.
- UNZIP V5.5 can't work on OpenVms V6.2 (just form information); Ok on V7.2 (not checked on V7.1 or V7.0).
- Made CONVERT to sequential then CONVERT to indexed; most fo record are readable but I've received duplicate keys during convertion from sequential to indexed; file seems containts all record but, on now I0m not sure of this.

John,
now I agree with you; I also read a few questions about ZIP/UNZIP over vms. Next time I'll use backup before zip.
Martin,
your link is like HP web site.
Hein,
I have to analyze some record of indexed file; it's not a perfomance problem, I have to repeat a read/write transaction on file.
About 512 fix/recod, I'll can use it next time, because I can't access always to my customer data.

Now I'm going to TV to view football match (Italy vs Denmark).
See you tomorrow ...

Antonio Vigliotti

Antonio Maria Vigliotti
Martin P.J. Zinser
Honored Contributor

Re: Indexed file corrupt

Hello Antonio,

ftp://ftp.info-zip.org/pub/infozip/src/

contains the latest UnZip 5.51 sources. The Web page has not been updated yet, but the release is not since a short while.

There is not reason at all why this would not work on older VMS versions, just run the build script and off you go.

Having said this, it is in my experience much more important to use the current Zip version than UnZip ;-) You should be at least at 2.3, if the problem persists get in touch with me concerning the current test version (zinser@zinser.no-ip.info).

And again having said this, it is my experience that files showing problems in a
Zip/UnZip cycle often have internal problems, like not being converted for a long time with many updates/inserts/deletes or having thousends of extends. Doing an anal/rms on the original file and checking and fixing such problems can be generally very beneficient, also for the performance of the application actually using the file ;-)

Greetings, Martin

Antoniov.
Honored Contributor

Re: Indexed file corrupt

Hi Martin P.J.,
I compressed using ZIP V2.3; original file is on my customer host, may contains thousand of extends but until now it works fine. Because it's a indexed rms file, application make many insert/update and some delete record.
Using CONVERT I could made my test so actually I have no more trouble.
However I will know what did happened to avoid in future time same problem.

About unzip V5.5, compiled doesn't work on V6.2, message is:
%DCL-W-ACTIMAGE, error activating image CMA$TIS_SHR
-CLI-E-IMGNAME, image file CMA$TIS_SHR.EXE
-SYSTEM-F-SHRIDMISMAT, ident mismatch with shareable image
I think compiling source code I can solve but now it's not my scope.

I think zip/unzip on vms is unstable and I remember you did hint another software to compress/decompress on vms but now I don't remember what is.

Antonio Vigliotti
Antonio Maria Vigliotti
Ian Miller.
Honored Contributor

Re: Indexed file corrupt

Alternate software for compression - seek FTSV a.k.a SPOOL - although parahaps its not publicly available. It uses the DCX library routines and can make self extracting .exes
____________________
Purely Personal Opinion
John Eerenberg
Valued Contributor

Re: Indexed file corrupt

> now I agree with you; I also read a few
> questions about ZIP/UNZIP over vms. Next time
> I'll use backup before zip.

To help the backup along, do a set rms/extend before and after the backup:
$ set rms/extend=65535
$ backup
$ set rms/extend=0

That should override the extend quantity on the target disk and speed things up a lot hopefully.

john
It is better to STQ then LDQ
Martin P.J. Zinser
Honored Contributor

Re: Indexed file corrupt

Hello Antonio,

if I did seem to imply any misgivings about Zip, this was not the intention. We do use it very regularly for various purposes and generally speaking the SW has been very solid. Actually I am pretty sure we go through more images for the BACKUP command than for Zip in any given time.

That is not to say, there are not areas that need work (e.g. ODS-5 support). Largefile
support (>4GB) is in the works, esp. if I do find the time to work on the latest beta ;-)

Greetings, Martin