LOCATE primary command
Use the LOCATE primary command to:
- Position a scrollable formatted display at the field that matches the supplied field-name. The display is positioned on the field that contains the supplied string.
- Search the current primary sort order column for a matching string, in member selection panels.
LOCATE command with scrollable formatted data
In SNGL format, the display is scrolled down such that the matching field is the first field displayed in the scrollable area.
In TABL format, the display is scrolled right such that the matching is the leftmost field displayed in the scrollable area.
Scrolls to the specified segment or field.
Syntax
LOCATE command in member selection panels
In member selection panels, the LOCATE command
searches the current primary sort order column for a matching
string to the string entered with the command. The LOCATE command
positions to the top of the display the column value either equal to, or closest
value less than or greater than depending on the sort order.
LOCATE command in the Template Specification panel
In the Template Specification panel, the LOCATE command
searches the list of the segment names and positions to the first
segment name that matches the entered string.
- #Ref
- The field reference number of the field that
you want to locate. Applies when the field is not
an item in an array. For example:
Available in SNGL or TABL display format only.L #3
- #Ref(subscript)
- The field reference number and occurrence of
the field that you want to locate. Applies when
the field is an item in an array. You must specify
a subscript in parentheses to identify the occurrence
that you want to locate. If your field is part of a
multi-dimensional array, you must specify a subscript
for each dimension in the array. For example:
L #7(5)
Available in SNGL or TABL display format only.L #9(2,3)
- string
- The name (or part of the name) of the field that you
want to locate. This string can occur anywhere in the
field name. For example:
orL SAL
locates a field namedL ARY
SALARY
.Available in SNGL or TABL display format only.
- FLD string
- Indicates to FM/IMS that the string following
the FLD keyword is the name or part of the name of the
field that you want to locate. This is used to resolve
any ambiguity that may exist between field names and
other command parameters. For example, if your field name
contained the # symbol (for example #Items), the command
L #Items
would result in an error, as FM/IMS is expecting the # symbol to be followed by a numerical field reference number. Using the commandL FLD #Items
resolves this problem.Available in SNGL or TABL display format only.
- NEXT
- Finds the next occurrence of the field name,
to the right (TABL display) or down (SNGL display)
from the cursor location. Must be used in conjunction with
string or FLD string, in any order.
For example:
orL NEXT SAL
L SAL NEXT
Available in SNGL or TABL display format only.
- PREV
- Finds the previous occurrence of the field name,
to the left (TABL display) or up (SNGL display)
from the cursor location. Must be used in conjunction with
string or FLD string, in any order.
For example:
orL PREV SAL
L SAL PREV
Available in SNGL or TABL display format only.
- LAST
- Finds the last occurrence of the field name,
regardless of the cursor location. Must be used in
conjunction with string or FLD string,
in any order. For example:
orL LAST SAL
L SAL LAST
Available in SNGL or TABL display format only.
- FIRST
- Finds the first occurrence of the field name,
regardless of the cursor location. Must be used in
conjunction with string or FLD string,
in any order. For example:
orL FIRST SAL
L SAL FIRST
Available in SNGL or TABL display format only.
Availability
- IMS data panel
- Database Positioning panel
- Member selection panels.