How FM/IMS finds a position in the database

The default starting position for any database is to display the first segment occurrence of the root segment. However, IMS databases can contain many millions of records and, for performance reasons, you might want to position the display of the data at a different segment occurrence.

To achieve this, you specify key values for a selected segment type. FM/IMS uses these key values to create SSAs (segment search arguments) for each segment level in the hierarchical path of the selected segment type. FM/IMS displays the first segment occurrence in the database that matches the key values you specify. If a view has been used and the matching segment is not displayed by that view, the starting position is the next displayable segment occurrence after the matching segment.

The hierarchical path of a segment consists of the segments at each level in the database hierarchy between that segment and the root segment. For example, for a segment at level 3, you enter key values for that segment, and for its related level 2 and 1 (root) segments.

You can specify the starting position key values on either the Database Positioning panel or the Key Specification panel. The Database Positioning panel lists segments for many hierarchical paths and you can specify key values for any segment in the list. However, when you select a segment to view, FM/IMS only uses the keys in the hierarchical path of that segment. The SSA created for any value specified uses the equals (=) operator. The Key Specification panel lists only the segments in the hierarchical path of the segment you selected. This makes it easier to see exactly which keys are used to determine the database position. The Key Specification panel also allows you to create complex SSA statements, using a variety of relational operators.

If you leave blank any key values in the hierarchical path of the selected segment type, then FM/IMS formats an unqualified SSA for that level.