Raw-transfer error 4955

bond007jlv

New Member
I am using the raw-transfer to extract audit records from an audit table. the raw-transfer works for some tables, but with one table I get the Table signatures do not match (4955). I wrote a simple program to test the raw-transfer command. The program defines a variable as raw and a temp-table like the db table. I raw-transfer the db record to the raw variable and then raw-transfer the raw varaible to the temp-table. It works for some tables, but not others. Not sure what to do. I would appreciate any help on this issue. Below is the program I used to test the raw-transfer statement.

DEF VAR vRaw AS RAW.
DEF TEMP-TABLE tt1 LIKE syscode.
FIND FIRST syscode.
RAW-TRANSFER syscode TO vRaw.
RAW-TRANSFER vRaw TO tt1.
DISPLAY tt1 WITH 1 CO:confused:L.
 

taqvia

Member
First thing to do is to figure out which table has hole/gap in rpos sequence.
execute the below in after doing a mpro db (if in muktiuser mode)


Def Var li-Position as int.
Def Var outLine as char initial "".

for each _file where not _hidden no-lock.
li-Position = 1.
outLine = "".

for each _field no-lock where
_field._file-recid = recid(_file)
by _field._Field-Rpos:

li-Position = li-Position + 1.
if li-Position ne _field-rpos then do:
outLine = _file-Name + "|" +
_field-name + "|" +
string(_field-rpos) + "|" +
string(li-Position) + "\n".
put unformatted outLine.
end.
end.
end.


Once you are aware of the problematic table just reset the sequence through 4gl code. You need a outage and full system compilation as rpos is used in CRC calculation.

eg

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

FOR first _field WHERE _field._file-recid = RECID(_file)
and _field-name = "filed-name"
:
ASSIGN _field._field-rpos = <sequence number which should be as per above query>
_order = <also set the order /optional>
.
END.

else you can write a generic query to go through all the fields in the table and set the rpos sequentially.

NOTE: before doing any chnages to VST make sure to take backup.


Arshad
 
Top