Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Difference between Find and Locate Commands

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Mon Nov 19, 2007 4:52 pm    Post subject: Difference between Find and Locate Commands
Reply with quote

Hi all

Could anyone please explain to me what is the difference between FIND and LOCATE Commands?


Thanks,
Gnanas
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10456
Location: italy

PostPosted: Mon Nov 19, 2007 5:22 pm    Post subject: Reply to: Difference between Find and Locate Commands
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 971
Location: Richmond, Virginia

PostPosted: Tue Nov 20, 2007 2:39 am    Post subject:
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Nov 20, 2007 11:38 am    Post subject: Reply to: Difference between Find and Locate Commands
Reply with quote

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
View user's profile Send private message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Thu Jan 08, 2009 2:18 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Jan 08, 2009 10:11 pm    Post subject:
Reply with quote

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". icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts How to get the output from submit com... Joanna2016 CLIST & REXX 10 Tue Feb 06, 2018 7:26 am
No new posts Unable to send mail with SMTP commands harsh.saxena579 JCL & VSAM 10 Tue Dec 12, 2017 1:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us