On Jun 30, 5:07 am, chandra.krothapa...@gmail.com wrote:
Hi,
I am writing a program to read database logs using db2Readlog/
db2ReadLogNoConn API.
I am able to parse the data of "FIXED format data" and link them to
appropriate columns for a given UPDATE/INSERT/DELETE.
I am having difficulty in parsing the "Variable format data". In the
log record I am not able find information about data length of each
column.
Could some one please tell me how can I parse "Variable format data"
and link them to appropriate fields.
Thanks
Chandra
1. Fixed block contains the data for fixed length columns, for the
columns with variable length, instead of the content there is the
fixed
length data of 4 bytes (not null column) or 5 bytes (for null columns)
described as follows in the manual "All variable field types have a
4-byte fixed data portion in the fixed length section (plus a null
flag, if the column is nullable). The first 2 bytes (short) represent
the offset from the beginning of the fixed length section, where the
variable data is located. The next 2 bytes (short) specify the length
of the variable data referenced by the offset value." (page 523).
2. variable length block has the content of the variable length
columns
Bernard Dhooghe