TMF Application Programmer's Guide (G06.26+)

TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide—522419-005
5-28
Field Descriptions
UPDATE FIELDCOMP (15)
This record reflects the form of audit compression used by NonStop SQL/MP.
Compression within this type of record is achieved by omitting fields that were not
updated and that do not belong to the primary key of the file. Information about the
fields contained in the audit record is available by using the ARGETFIELDINFO
procedure, and the before-image and after-image of each field are available by using
the ARFETCHFIELDVALUE procedure.
Variable-length fields: before-images and after-images of all updated fields and
primary key fields
Field Descriptions
The following paragraphs briefly describe the fields returned by the ARREAD and
ARFETCHxxx procedures. Note that not every field discussed is present in every type
of audit record.
After-image
An after-image is a byte-for-byte copy of a record (as it was after being inserted or
modified) in an audited file.
The AFTERLEN field returned by the ARREAD procedure specifies the length (in
bytes) of the associated after-image field.
You use the ARFETCHAFTERIMAGE procedure to copy the after-image field from the
audit record into your application buffer.
For key-sequenced files that have the DCOMPRESS (key compression in data blocks)
attribute set, it is possible that an after-image retrieved from an audit record using the
ARFETCHAFTERIMAGE procedure will include the leading compression-count byte.
In most cases the audit-reading procedures can detect that key compression is being
used and remove its effects from the record image. There are situations, however, in
which it is not possible to detect compression; in particular, when the record is
involved in an insertion or update that caused a block split and the compression count
for the record is 1. Whenever this occurs, ARFETCHAFTERIMAGE returns a warning
code.
02 UPDATEFIELDCOMPREC redefines BODY.
04 TRANSID type binary 64,0.
04 DATAFILE type FILESPEC.
04 EXTERNALNAME type DSMSMFILESPEC.
04 OBJECTTYPE type binary 16,0. ! to id SQL/MX objects
04 UNDOFLAG type binary 16,0.
04 HOMENODE type binary 32,0. ! system number
04 FILLER type x(4)