View previous topic :: View next topic
|
Author |
Message |
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Hi all
Could anyone please explain to me what is the difference between FIND and LOCATE Commands?
Thanks,
Gnanas |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
without looking at the manuals ( so I might be wrong )
find means search for a string in the data
locate means go to a line number ( relative/absolute depending on the number setting ) |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Find on a member list will find the search chars anywhere in the names, and F5 will repeat-find.
Locate looks starting with the first char of each name and positions you on the first member name that matches. If you Locate on all 8 chars, it's the top name; o.w., it's the 2nd name on the screen.
Neither requires wildcard chars. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
gnanas,
The difference between FIND and LOCATE can be best seen while searching for members inside a PDS.
Say u have a PDS where the members are names AA,BB and CC
First u search for the member BB using FIND command. Once this is executed your member BB will be the first member displayed.
Now when you again search for AA, it will display *Bottom of list reached*. But if you LOCATE AA then AA would be found as LOCATE searches the whole list. |
|
Back to top |
|
|
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Say we are searching for a member XYZ in a pds,
The members of the pds are
ABC
ACC
BCF
DEF
XXF
XYZ
ZDF
Locate compare the first character X with first character of first member and if found not same, it wil not compare the rest of the members till encounters a character change ( observe that members will be sorted alphabatically). This process continues till it encounters X then it compares 2nd char and so on.
Where as FIND will compare the entire string with all the members.
That is the reason why locate will point to the searched member faster than find. Try to find and locate in a pds which has more than 4000 members ( ideally loadlibs)
Correct me if I am wrong |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I see this is an old thread but doesn't it make a lot of difference on which ISPF panel the FIND or LOCATE command is keyed in? I would have suggested, "F1 is your friend". |
|
Back to top |
|
|
|