Kbase P59226: Records in output file appear truncated when exporting or du
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/15/2003 |
|
Status: Unverified
FACT(s) (Environment):
UNIX
SYMPTOM(s):
Records in output file appear truncated when exporting or dumping data.
No errors occur during the dump / export process.
CAUSE:
Your record contains characters that aren't within the codepage that you are using. e.g. Corrupt characters, or parts of multi-byte characters etc.
FIX:
You can run these commands to tell you which tables/fields have corruption, but unfortunately it doesn't tell you the recid values:
_proutil dbname -C truncate bi -G 0
_proutil dbname -C convchar charscan utf-8 > badfields.txt
You could follow the steps below to determine which records contain a particular bad character, if you can't determine that already from the truncated line:
First try to get that corrupt line from your export file as the last line within an ASCII file. You will have to use your imagination here, maybe by using commands like "split", "head", "tail" etc.
When you have that line, you could then use "od" to get the hex value of that bad character. e.g:
od -h badrec.txt
The output will look like 1122 3344 5566 0a00 ... Every two digits is a byte. e.g. 2 digits = 1 hex byte. Look at the end of the line and you will see 0a byte. That is the line feed character.
You need to make note of the byte that is immediately before the 0a. e.g. 66. This is the character that is causing the problems. Create an _proutil command with 0x66, like this:
_proutil dbname -C convchar charscan utf-8 "0x66" -G 0 > 66.txt
The 66.txt output file will contain the table name, field name, and recid of the record containing the corruption.
Use 4GL to find that record and use the ASSIGN statement to assign a new value to that field. Do NOT use the UPDATE statement to change the field value.