Example 1 - K Line Command


The first example shows the use of the K line command on the Data Base Location screen. The Key Specification screen is displayed to enable you to specify the segment to be retrieved. After the key is fully specified, the segment is displayed in Formatted mode.

In the following figure, the Data Base Location screen is shown with the current segment positioned on an occurrence of the ORDR030 segment type. When a K line command is entered on the ORDR010 root segment line, the Key Specification screen shown in Initial Key Specification Screen - K Line Command is displayed.

Initial Key Specification Screen - K Line Command

image2021-3-14_23-56-14.png

Initial Key Specification Screen - K Line Command

image2021-3-14_23-53-52.png

On the initial Key Specification screen, the relational operator for the ORDR010 segment is changed from EQ to > and the END command is entered as shown in the following figure. When ENTER is pressed, File-AID for IMS and IMS to search for the first ORDR010 segment occurrence with a key value greater than AA2222.

Key Specification Screen with Key Value Specified

image2021-3-14_23-56-36.png

An ORDR010 segment with a key of AA4444 is found and displayed in Formatted mode as shown in the following figure.

Formatted Screen with New Current Segment

image2021-3-14_23-56-50.png

Related topics

 

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