Segment types

There are many segment types available in IMS database and will be explained in detail below.

IMSDB Segment Types -

Segment Types

ROOT Segment -

The entry point to the database. It has no parent segment. It is the highest segment in the record.

There can be only one root segment in the record. There can many records in the database. In the above example, A is the root Segment.

Dependent Segment -

All the segments in the record except the root segment. Dependent segments are directly or indirectly depends on the segments above. In the above example, B, C, D1&D2, E1&E2, F1, G1&G2 are the dependent segements.

PARENT Segment -

Any segment which has a dependent segment. It might be root segment and/or the segments in between the tree structure. In the above example, A, B & C are the parent segments.

CHILD Segments -

Any segment which is dependent on some segment above. All the segments come under this category except root segment. In the above example, B, C, D1&D2, E1&E2, F and G1 & G2 are comes under Child segments category.

TWIN Segment -

Multiple occurrence of a dependent segment. All the occurrences are under the single parent. In the above example, D1&D2, E1 &E2 and G1 &G2 called as twin segment.

Sibling Segment -

Segments under the same segment of different types. In the above example, B & C are sibling segments under A, D1 & E1 are sibling segments under B, F & G1,G2 are the sibling segments under C.