LOCATE primary command

The LOCATE primary command searches the current context for an occurrence of a specified item (for example, a member, a record, a field or a line).

Syntax

LOCATE command in View or Edit

In an editor session, this command scrolls to the specified record or field within the displayed data set or data set member.

In an editor session, the syntax of this command is:

Figure 1. Syntax in View or Edit

1 Locate
2.1 rec_num
2.1 label(1)
2.1 ref
2.1 
2.2.1 string
2.2.1  FLD string
2.2.1! NEXT
2.2.1 PREV
2.2.1 LAST
2.2.1 FIRST
2.1 
2.2.1! NEXT
2.2.1 PREV
2.2.1 LAST
2.2.1 FIRST
2.2.1 string
2.2.1  FLD string
2.1 ICHK
Notes:
  • 1 Edit only
LOCATE command in the Find/Change Utility

In the Find/Change Utility, this command positions a specified member at the top of the list of members to be processed.

In the Find/Change Utility, the syntax of this command is:

Figure 2. Syntax in the Find/Change Utility

1 Locate
2 member
Non-VSAM Extent Information panel

In the Non-VSAM Extent Information panel, use this command to locate specic data.

In the Non-VSAM Extent Information panel, the syntax of this command is:

Figure 3. Syntax in Non-VSAM Extent Information panel

1 Locate
2.1 (n)
2.2.1! NEXT
2.2.1 PREV
2.2.1 LAST
2.2.1 FIRST
2.1 111
1?I
LOCATE command in AFP Browse

In the AFP Browse panel, the LOCATE primary command positions a specified page number at the top of the display.

In the AFP Browse panel, the syntax of this command is:

Figure 4. Syntax in AFP Browse

1 LOCATE
1 LOC
1 L
2 page_num
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.
Figure 5. Syntax in Member Selection List

1 LOCATE
1 LOC
1 L
2 string
LOCATE command in the Copybook Selection panel
In the Copybook Selection panel, the LOCATE command searches the list of members for a matching string to the string entered with the command and positions the first matching member to the top of the display.
Figure 6. Syntax in the Copybook Selection panel

1 LOCATE
1 LOC
1 L
2 string
LOCATE command in the Field Selection/Edit panel
In the Field Selection/Edit panel, the LOCATE command searches the displayed template for either a field reference number, or the starting or full characters of a field name.
Figure 7. Syntax in the Field Selection/Edit panel

1 LOCATE
1 LOC
1 L
1 template_ref
1 template_fldname
LOCATE command in the Load Module Information panel

In the Load Module Information Panel, the LOCATE command locates a specified name (if the result is sorted by name) or address (if the result is sorted by address).

Figure 8. Syntax in the Load Module Information panel

1 LOCATE
1 LOC
1 L
2  string
LOCATE command in a WebSphere® MQ selection list

When you are viewing a WebSphere® MQ selection list, the LOCATE command searches the current held columns for a matching string to the string entered with the command.

The LOCATE command positions to the top of the display the column value which is equal to the specified string, or contains the specified string.

Figure 9. Syntax in in a WebSphere® MQ selection list

1  LOCATE string
rec_num
The number of the record that you want to locate. For example:
LOCATE 23
locates record number 23.
line_num
The line number of the data set name that you want to locate. For example:
LOCATE 23
locates the data set name on line 23.
volser
(Extent panels only.) The disk volume in the list that you want to locate. For example:
LOCATE D$ST04
locates disk volume D$ST04.
(n)
(Extent panels only.) The nth disk volume in the list that you want to locate. For example:
LOCATE (7)
locates the 7th disk volume in the list.
111
(Extent panels only.) The 111-th extent of the data set. For example:
LOCATE 248
locates the 248th extent of the data set.
I
(Extent panels only.) Indicates you want to search the index component of VSAM data sets. For example:
LOCATE FIRST I
locates the first volser of the data set.
page_num
The page number of the data that you want to locate. For example:
LOCATE 23
scrolls to page 23 of the print data.
label
An existing user-assigned or editor-assigned label, identifying the record that you want to locate. The label must start with a period (.) followed by one to four alphabetic characters (no numeric or special characters). Labels starting with the letter “Z” indicate an editor-assigned label. For example:
LOC .HERE
locates a record marked with an existing label (.HERE), and
L .ZLST
locates the last record in the data set.
ref
A field reference, specifying the field that you want to locate, for example:
L #3
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, for example:
L #5(3)
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(2,3)
Available in SNGL or TABL display format only.
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:
L SAL
or
L ARY
locates a field named “SALARY”.

For member selection list panels, the string syntax must be consistent with the target column for the locate command. For example, for dates the string must contain valid month, day, and year values.

For the Load Module Information panel, the content of the string depends on the sequence in which the information is displayed. You can sort the result by name or by address. To sort by name, the string must be a symbol name. To sort by address, the string must be a valid hex address.

In View or Edit, the LOCATE command is available in SNGL or TABL display format only.

template_ref
A field reference, specifying the field that you want to locate in the template displayed on the Field Selection/Edit panel.
For example, to locate the cursor in the prefix area of the line containing field reference 3, issue the command:
L #3
template_fldname
The full name, or starting characters, of a field displayed on the Field Selection/Edit panel that you want to locate in the template.
For example, to locate the cursor in the prefix area of the line containing the field with the name SALARY, issue the command:
L SALARY
or
L SAL
FLD string
Indicates to File Manager 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 (e.g. #Items), the command L #Items would result in an error, as File Manager is expecting the # symbol to be followed by a numerical field reference number. Using the command L FLD #Items resolves this problem.

Available in SNGL or TABL display format only.

NEXT
  • For non-extent panels:
    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:
    L NEXT SAL
    or
    L SAL NEXT

    Available in SNGL or TABL display format only.

  • For extent panels:
    Finds the next volser of the data set. For example:
    L NEXT
  • For the Load Module Information panel:
    Finds the next name or address, depending on the order in which the information is presented. For example, if 0000FACC was recently located,
    L NEXT
    positions at the next occurrence of the address 0000FACC.
PREV
  • For non-extent panels:
    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:
    L PREV SAL
    or
    L SAL PREV

    Available in SNGL or TABL display format only.

  • For extent panels:
    Finds the previous volser of the data set. For example:
    L PREV
  • For Load Module Information panel:
    Finds the previous name or address, depending on the order in which the information is presented. For example, if 0000FACC was recently located,
    L PREV
    positions at the previous occurrence of this address.
LAST
  • For non-extent panels:
    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:
    L LAST SAL
    or
    L SAL LAST

    Available in SNGL or TABL display format only.

  • For extent panels:
    Finds the last volser of the data set. For example:
    L LAST
  • For the Load Module Information panel:
    Finds the last name or address, depending on the order in which the information is presented. For example, if 0000FACC was recently located,
    L LAST
    positions at the last occurrence of this address.
FIRST
  • For non-extent panels:
    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:
    L FIRST SAL
    or
    L SAL FIRST

    Available in SNGL or TABL display format only.

  • For extent panels:
    Finds the first volser of the data set. For example:
    L FIRST
  • For the Load Module Information panel:
    Finds the first name or address, depending on the order in which the information is presented. For example, if 0000FACC was recently located,
    L FIRST
    positions at the first occurrence of this address.
ICHK
Scrolls to the next record that encountered an integrity check while being saved.

Availability

Related tasks and examples