Segment modes 3, SRLSEG, and 257, SCHSRL, are the only segment modes that place data in the data record. All the other modes simply extracted data from the record, which is optionally transformed, and made part of a key value. The automatic sequence number feature of c-tree permits the application data record to contain an increasing or decreasing, as explained below, 4-byte/8-byte data field. When SRLSEG or SCHSRL are used, each time a new record is added to the data file, c-tree increments the data file’s serial, or sequence, number. SRLSEG and SCHSRL cause this sequence number to be placed in the record structure at the byte offset indicated by the key segment information.
More than one key may include a SRLSEG/SCHSRL key segment, but each of these segments must have an identical byte offset. That is, the different keys using the serial number use the same 4-byte/8-byte region of the data record.
To update the serial number when a record is rewritten, delete the record and add it as a new record. ReWriteRecord() does not change the serial number.