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:
- 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:
- 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:
- 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:
- 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 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.
- 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.
- 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).
- 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.
- rec_num
- The number of the record that you want to locate. For example:
locates record number 23.LOCATE 23
- line_num
- The line number of the data set name that you want to locate. For example:
locates the data set name on line 23.LOCATE 23
- volser
- (Extent panels only.) The disk volume in the list that you want to locate. For example:
locates disk volume D$ST04.LOCATE D$ST04
- (n)
- (Extent panels only.) The nth disk volume in the list that you want to
locate. For example:
locates the 7th disk volume in the list.LOCATE (7)
- 111
- (Extent panels only.) The 111-th extent of the data set. For example:
locates the 248th extent of the data set.LOCATE 248
- I
- (Extent panels only.) Indicates you want to search the index component of VSAM data sets. For
example:
locates the first volser of the data set.LOCATE FIRST I
- page_num
- The page number of the data that you want to locate. For example:
scrolls to page 23 of the print data.LOCATE 23
- 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:
locates a record marked with an existing label (.HERE), andLOC .HERE
locates the last record in the data set.L .ZLST
- ref
- A field reference, specifying the field that you want to locate, for example:
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 #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 #5(3)
Available in SNGL or TABL display format only.L #7(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 named “SALARY”.L ARY
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:
orL SALARY
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 commandL 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:
orL NEXT SAL
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,
positions at the next occurrence of the address 0000FACC.L NEXT
- For non-extent panels:
- 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:
orL PREV SAL
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,
positions at the previous occurrence of this address.L PREV
- For non-extent panels:
- 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:
orL LAST SAL
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,
positions at the last occurrence of this address.L LAST
- For non-extent panels:
- 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:
orL FIRST SAL
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,
positions at the first occurrence of this address.L FIRST
- For non-extent panels:
- ICHK
- Scrolls to the next record that encountered an integrity check while being saved.
Availability
- Browse panel
- Editor panel
- Find/Change Utility panel
- Catalog Services Data Set List panel
- Display VTOC panel
- AFP Print Browse panel
- Member Selection panel
- Copybook Selection panel
- Non-VSAM Extent Information panel
- VSAM Statistics and Extent Detail panel
- WebSphere MQ Managers panel
- WebSphere MQ Queue List panel
- Template Member List panel