| Bob,
I can see several solutions:
- Write a small BASIC to FIND and DELETE or COBOL program that
simply DELETES the record. Both use a SYS$FIND to position to
the record. The record contents would not be moved and the
RTB error should not occur though other error due to the same
corruption may happen. Work on a backup!
- Write a small program to read the records up to the bogus
record and another to read the records after it. The use
CONVERT to combine the two (sequential) files.
$RUN GET_FIRST_BIT
$RUN GET_REST
$ANA/RMS/FDL SYSUAF
$CONV/STAT/FAST/NOSORT FIRST_BIT,REST SYSUAF/FDL=SYSUAF
- Patch the file. To quickly find which VBN to attack print
out the RFA for the bogus record or the one just before it.
Dump the offending bucket and post the output here. Perhaps
someone can hint you how to zap it.
DTR can probably also be used for the first and the second method.
Hope this helps,
Hein van den Heuvel.
|
| I had the exact same problem about 4 months ago on a cluster with
4000+ user entries (don't ya love it!). I basically used a method
similar to what Hien recommended.
1. I wrote a BASIC program that just read records and wrote them
to an identical output file (CONVERT/FDL) until a read failed.
2. Then the program would take the value of the last primary key
that was read successfully, add a small value to it, and try a
keyed read from the file. If that also failed it would increment
the value and try again and again until it succeded.
3. Then it would write this record to the output, and return to
the cycle of reading and writing until the end of the file.
Worked like a charm.
-- Barry
|
| I was able to recover almost all of my bad SYSUAF.DAT file with the
attached program that was provided to my by Barry (CHOVAX::) Young.
Thanks to everyone who responded, and especially to Barry for the
nifty program.
-Bob
!$ BACKUP /IGNORE=INTERLOCK sysuaf.dat sysuaf.back
!$ ANALYZE /RMS /FDL sysuaf.back
!$ RUN sysuaf_fix
!$ CONVERT /FDL=sysuaf sysuaf.new sysuaf.dat
!$ EXIT
Option type=explicit
Declare long more_data
Declare long step_over
Declare long character
Declare string test_key
Map (sysuaf) string dummy=1412
Map (sysuaf) string fill=4, username=32, long uic
Open "sysuaf.back" for input as file #1%, &
map sysuaf, organization indexed variable, &
recordtype none, &
primary key username noduplicates nochanges , &
alternate key uic duplicates changes
Open "sysuaf.new" for output as file #2%, &
map sysuaf, organization indexed variable, &
recordtype none, &
primary key username noduplicates nochanges , &
alternate key uic duplicates changes
More_data = -1%
While more_data
When error in
Get #1%
Put #2%
Use
If ( err = 11% ) then
Step_over = 0%
More_data = 0%
Else
Step_over = -1%
End if
End when
Character = 1%
Test_key = username
While ( step_over )
When error in
Mid$ ( test_key, 33%-character, 1% ) = Chr$ ( 255% )
Get #1%, key #0% ge test_key
Step_over = 0%
Use
Character = character + 1%
Step_over = 0% if character > 32%
More_data = 0% if character > 32%
End when
Next
Next
Close #1%
Close #2%
End
|