HISAM segment structure


This topic provides information on the HISAM segment structure.

Figure 1 shows this structure; a description of the structure immediately follows the figure.

Figure 1. HISAM segment structure

GUID-59D162E8-5F34-4369-9A7E-08F4E6E60584-low.png

Segment code

1 byte. The segment code byte contains a one-byte unsigned binary number which is unique to the segment type within the database. The segments are numbered in hierarchical order starting at 1 and ending with 255 (X'01' through X'FF').

Delete byte

1 byte. The delete byte contains a set of flags as follows:

  • BIT 0

    This bit on indicates that the segment is deleted.

  • BIT 1

    This bit on indicates that the database record has been deleted (that is, the root has been deleted). Within the scope of PCP, this flag will not be found on since it only applies to root segments in an ISAM primary data set; VSAM primary data sets will have the logical record physically deleted.

  • BIT 2

    This bit on indicates that the segment has been processed by the IMS delete routine.

  • BIT 3

    This bit is reserved for future use and should always be binary zero.

  • BIT 4

    This bit is not used in HISAM.

  • BIT 5

    This bit on indicates that the segment has been deleted from its physical path. IMS uses this bit only if the segment is involved in a logical relationship and can be accessed from a logical path that is not through its physical parent. With this bit on, it is still possible to access this segment through a logical path.

  • BIT 6

    This bit on indicates that the segment has been deleted from its logical path. IMS uses this bit only if the segment is involved in a logical relationship and can be accessed from a logical path that is not through its physical parent. With this bit on, it is still possible to access this segment through a physical path.

  • BIT 7

    This bit on indicates that the segment is to be removed from its logical twin chain. Bits 5 and 6 must be on for this flag to be on.

Counters and pointers

The appearance of this area depends on the logical relationship status of the segment:

  • If the segment is not a logical child or logical parent, this area is omitted.
  • If the segment is a logical child, and if a direct pointer is specified (the logical parent must be in an HD database), then the four-byte RBA of the logical parent would be present.
  • If the segment is a logical parent and has a logical relationship which is unidirectional or bidirectional with physical pairing, then a four-byte counter will exist.

If the segment is a logical parent and has one or more logical relationships which are bidirectional with virtual pairing, then for each relationship there will be a four-byte RBA pointer to the first logical child segment (a logical child first pointer) and, optionally, a four-byte RBA pointer to the last logical child segment (a logical child last pointer), depending on whether SNGL or DBLE is specified on the LCHILD statement.

There will be only one counter in a segment, but there can be multiple logical child first and logical child last pointers. The counter will precede the pointers. The pointers will be in the order that the logical relationships are defined in the DBD with a logical child first pointer before a logical child last pointer.

The following figure shows this type of segment.

Figure 2. Multiple logical child pointers in a segment

GUID-D4E1E487-AFD6-4DCC-B3F5-EAC370040EEF-low.png

Data

The length of the data area can be a fixed length (which is specified in the DBD) or a variable length (described in Variable-length-segment-structure). For a logical child segment with symbolic keys (PARENT=PHYSICAL on the SEGM statement), the concatenated key of the logical parent will be at the start of the segment.

If the segment is variable length, the first two bytes of the data area are a binary number which represents the length of the data area including the two-byte length.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

POINTER CHECKER PLUS 5.0