Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10232
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: 962
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: 114
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
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us