Sequence of searched segments

When you specify the NEXT, FIRST, or ALL parameter with the FIND or CHANGE primary commands, FM/IMS searches in a forward direction from the first segment within the search range toward the last. In a forward direction, the FIND and CHANGE primary commands read the latest data from the database.

When you specify the PREV parameter with the FIND or CHANGE primary commands, FM/IMS searches in a backward direction from the last segment within the search range toward the first.

Note: When you specify the PREV parameter, it restricts the search range to those segments between the top of the sliding window and the segment at the cursor position. The reason fo this is that IMS does not support reads in the backward direction, so FM/IMS mimics the backward search by examining segment locations that were stored in the sliding window as a result of your navigation actions. As a result, when you use the FIND or CHANGE primary commands in a backward direction FM/IMS may use segment information that is outdated and different from the actual database.

Related topics