Buffer info record

Because the data stream that the z/OS XML parser generates in the output buffer consists of one or more groups of records, each group always begins with the buffer info record - a record containing metadata about the parsed data stream contained in the current output buffer. This record includes the length of the buffer used by the record group and flags indicating the characteristics of the data stream.

The following is the structure for the buffer info record, including the record header:
Table 1. Buffer info record structure
  Fields
+0 record type flags reserved
+4 record length
+8 datastream options
+C parse status reserved
+10 buffer length used
+14
+18 offset to error record
+20
This record is not allowed to span output buffers, so the continuation flag in the record flags field of the buffer header will always be zero. The datastream options contain a flag indicating whether or not StringIDs are in use, plus some of the flags from the feature flags parameter on the z/OS XML parser init call. These flags indicate some characteristic of the data in the parsed data stream. The full list of flags indicate:
Note:
  1. The GXLHXEC_FEAT* flags in above parentheses are defined in gxlhxec.h for C/C++ callers and GXLYXEC for assembler callers. For assembler callers, remove the "GXLH" prefix from the constant names.
  2. The buffer info record is mapped out in gxlhxeh.h for C/C++ callers and GXLYXEH for assembler callers.

The "parser status" field is another set of flags in the buffer info record. If an unresolved external reference is present in this buffer, the unresolved reference bit will be on. If a non-representable character reference is present in this or a subsequent buffer for this document, the non-representable character reference bit will be on.

The "buffer length used" field indicates the portion of the output buffer consumed by the group of records represented by this buffer info record. If no buffers are spanned during the parse process, there will be only one buffer info record present in the output buffer, representing a single group of records. If buffers are spanned, there may be several record groups, each with corresponding buffer info records present in the output buffer. The number of record groups and buffer info records depends on how the caller manages the buffers that are passed to the parser. See Spanning buffers for more information.

The "error record offset" field indicates the offset from the beginning of the buffer info record to the beginning of the error info record. If this offset is zero, there is no error record present in the group of records represented by the buffer info record.