Operating System - OpenVMS
1826703 Members
2896 Online
109696 Solutions
New Discussion

RMS-F-CHK, bucket format check failed for VBN = nnn

 
waikamon charoenthai
Occasional Advisor

RMS-F-CHK, bucket format check failed for VBN = nnn

How To Recover From a RMS-F-CHK On An Indexed File.
when I use command type filename, this error will occur. So I use ana/fdl, it's okay. I got filename.fdl But wehn I convert/fdl, it has the same error and same VBN.
(OpenVMS/VAX 6.2)
5 REPLIES 5
David B Sneddon
Honored Contributor

Re: RMS-F-CHK, bucket format check failed for VBN = nnn

Can you please post the exact details of the analyze
command?
Depending on where the error occurs will determine
the possible recovery options.
Do you have a backup of the file?

Dave
labadie_1
Honored Contributor

Re: RMS-F-CHK, bucket format check failed for VBN = nnn

conv/exception=exception.txt/stat corrupted_file new_file then
conv/fdl=my_fdl new_file new_with_less_records

good luck

you have ZAP on the freeware if you know how to handle it, when working on damaged indexed files

see

http://h71000.www7.hp.com/freeware/freeware60/rms_tools/
waikamon charoenthai
Occasional Advisor

Re: RMS-F-CHK, bucket format check failed for VBN = nnn

Actually, I got the error when I used these commands.
$ type athfile.dat
%TYPE-W-READERR, error reading ATHFILE.DAT;1 -RMS-F-CHK, bucket format check failed for VBN = 19889

$ sear athfile B381340
%SEARCH-W-READERR, error reading ATHFILE.DAT;1 -RMS-F-CHK, bucket
format check failed for VBN = 19889 %SEARCH-I-NOMATCHES, no strings matched

So I tried to use these commans
$ ana/fdl=ath_fdl athfile.dat
So I got ath_fdl.fdl
$ convert/fdl=ath_fdl athfile.dat outputfile
So I got the error "-RMS-F-CHK, bucket format check failed for VBN = 19889"

More detail of ana/rms/stat, please see in attachment file

Willem Grooters
Honored Contributor

Re: RMS-F-CHK, bucket format check failed for VBN = nnn

Try ana/rms/interactive (see help) and drill down where is happens. Given TYPE and CONVERT err, I suspect a problem in the primary key. Can you access the file using EDIT and read on - probably not, but it's always good the know where it's going wrong. If you can, add (and delete) a character ans save the result (will besequential), after that, convert it using the FDL you created.

If that fails, you can try to get around it, by reading the file by a secondary key and write the line to a good one
In general (you'll have to elaborate):

$ ANALYZE/RMS/FDL/OUT=f.fdl
$ CREATE/FDL=f.fdl
$ OPEN /READ/END=ENDLOOP IN
$ OPEN/WRITE OUT
$LOOP:
$ READ/INDEX=1 IN LINE
$ WRITE OUT LINE
$ GOTO LOOP
$ENDLOOP:
$ CLOSE OUT
$ CLOSE IN

Eventually, you may create OUT as a sequential file, to be converted afterwards.

In case you have just the primary key, enhance to:

$ S=1 ! assume success
$ ANALYZE/RMS/FDL/OUT=f.fdl
$ CREATE/FDL=f.fdl
$ OPEN /READ/END=ENDLOOP IN
$ OPEN/WRITE OUT
$LOOP:
$ READ/ERROR=READERR IN LINE
$REENTER:
$ LASTKEY = F$EXTRACT (, $ WRITE OUT LINE
$ GOTO LOOP
$ENDLOOP:
$ CLOSE OUT
$ CLOSE IN
$ EXIT S
$READERR:
$ IF $S .eq. RMS-F-CHK ! you'll have to find out this value...
$ THEN
$ ! calculate next valid key. At elast LASTKEY + 2 (since at least +1 failed)
$ RDKEY = LASTKEY "+ 1" ! Next value!
$ READ/ERROR=READERR/KEY=RDKEY IN LINE
$ GOTO REENTER
$ ELSE
$ ! some other error means trouble!
$ ! take action...
$ s=$S
$ GOTO ENDLOOP
$ ENDIF

(need ot elaborate as well, just an example)

HTH

Willem
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: RMS-F-CHK, bucket format check failed for VBN = nnn

Welcome to the ITRC OpenVMS forum be sure to check out:
http://forums1.itrc.hp.com/service/forums/helptips.do?
and at some point:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140137


You have a corrupted file, at least one broken bucket at VBN 19889.

Restore a backup ASAP!

>> So I use ana/fdl, it's okay.

Not it is not! Errors are reported.
Also, this file appears overdue for serious re-organization/tunings. It is probably totally fragments. Just do a anal/rms/fdl/stat on it, edit/fdl/nointer and convert/stat/nosort/fdl...

Or convert with allocation=120000, extent=24000 and bucketsize=24 once it is operational again.


All standard tools will come to a grinding halt when getting to that bucket. As Willem suggest, you can attempt to read around it. Convert up to the crash point to sequential.

Look at the key for the last few records, 'guess' the key for a few records further and try to read from there (with cobol/dcl/basic, whatever tool.).
The restored backup will often help finding a good next key value, and sometimes can tell you what the broken bucket should look like.


Check out my RMS_TUNING.PPT presentation at:
http://h71000.www7.hp.com/freeware/freeware60/rms_tools/

There is some info on correcting broken files on page 40 and onwards. The reported corruption (check byte), may be easy to fix, if it is just that.


In that directory you will find other tools:
- zap to help flip bits in corrupted files.
- bonus/buckets.c to get key/bucket data from corrupted files.
- bonus/indexed_file_patch.bas to generate patch file automatically!

You may also want to consider involving support as a payed-for service if the data is really critical and if/when you need to try to explain the possible causes.

Good luck! (you'll need some).
Regards,

Hein.