Consultor Eletrônico



Kbase P150410: How to trouble shoot error (450) and (3191) that occur when dumping or displaying records
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   27/10/2009
Status: Verified

GOAL:

How to trouble shoot error (450) and (3191) when dealing with corrupted records?

GOAL:

How to fix record level corruption associated with 450 errors?

GOAL:

How to determine which fields are corrupted when dealing with error 450?

SYMPTOM(s):

SYSTEM ERROR: Cannot read field <field-num> from record, not enough fields. (450)

SYSTEM ERROR: Failed to extract field <field-num> from <file-name> record (table <table-num>) with RECID <RECID>. (3191)

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

The 450 error indicates record corruption. Specifically that a field within the record has an invalid format. You will need to delete and recreate each corrupted record, if possible. You can attempt to dump each corrupt records fields so that you can get as much information as possible from each record.

You need to use a field list to sequentially get each field prior to the corrupt one/s.

You first need to get a list of the fields and the order in which they are stored within the database. You can do that using the code below. First replace "yourtablename" with the failing table:

FIND _file WHERE _file._file-name = "yourtablename".

FOR EACH _field OF _file BY _field._field-physpos.
DISPLAY _field._field-name
_field._field-physpos.
END.

You can then use the following code to dump all fields prior to the field that is corrupt. You will need to go through this process for each corrupt record.

1. Replace "12345" with the appropriate RECID of the record that is failing.
2. Replace "yourtablename" with your failing table.
3. Replace yourfield_1-4 with the appropriate fields from the previous code output. e.g. All fields that are not corrupt:

DEF VAR myrecid AS INT NO-UNDO INIT 12345.
OUTPUT TO VALUE(string(myrecid) + ".txt").
FOR EACH yourtablename FIELDS (
yourfield_1
yourfield_2
yourfield_3
yourfield_4
) WHERE RECID(yourtablename) = myrecid:

PUT UNFORMATTED
"yourfield_1 = " STRING(yourfield_1) chr(10)
"yourfield_2 = " STRING(yourfield_2) chr(10)
"yourfield_3 = " STRING(yourfield_3) chr(10)
"yourfield_4 = " STRING(yourfield_4) chr(10).
END.

Note: If you are familiar with the EXPORT command, you could write 4GL code to export the record in its entirety. Only fields that can be read can be exported. The record then needs to be deleted from the database. See the steps that follow regarding how to use idxfix to delete corrupted records. The information you obtained from exporting the RECID could be used to compare the corrupted record to earlier copies of the record within database backups to identify the missing fields. Add the missing fields (the ones that were corrupted) to the text file that was exported. The output file can now be imported back into the database for the purpose of recreating the record.

How to delete bad records using the idxfix command:

proutil dbname -C idxfix

You will be presented with a menu, select these options:

Menu Item 6. Delete one record and it's index entries.
It will then ask you to "Type the RECID to delete."
It will then ask you to "Type the area for the RECID(s)."

Repeat for each RECID that is corrupt.

Once this is complete, you can then proceed to re-create your records from scratch using the data obtained earlier.