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
 

 

what are the main differences in search and search all

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vinayak

New User


Joined: 30 Jan 2004
Posts: 3

PostPosted: Wed Feb 04, 2004 4:31 pm    Post subject: what are the main differences in search and search all
Reply with quote

what are the main differences in search and search all?
Back to top
View user's profile Send private message

sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Wed Feb 04, 2004 8:55 pm    Post subject:
Reply with quote

Hi Vinayak,

Search uses linear search method for searching an element in an array of elements. SEARCH ALL uses binary tree method for searching.
For an array of less than 20 elements SEARCH is efficient but in other case SEARCH ALL is more efficient.
Others please add.

Please give some significant Subject other than Question.

Regards,
Sandip.
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Wed Feb 04, 2004 9:38 pm    Post subject: search and search all
Reply with quote

Hi vinayak,
adding to sandip here is some more info.it may help you.

When performing table look-up operations, SEARCH ALL, a binary search operation, is usually faster than SEARCH, a sequential search operation. However, SEARCH ALL requires the table to be in ascending or descending order by search key, while SEARCH imposes no restrictions on table organization. Also, with SEARCH ALL there should be unique key values in the table. Before using SEARCH ALL, you must pre-sort the table. If the table is not sorted, SEARCH ALL often gives incorrect results.


A binary search (SEARCH ALL) determines a table's size, finds the median table entry, and searches the table in sections, by using compare processes. A sequential search (SEARCH) manipulates the contents of an index to search the table sequentially.

thanks and regards
ANURADHA
Back to top
View user's profile Send private message
manoopatil

New User


Joined: 07 Dec 2003
Posts: 56
Location: Montreal

PostPosted: Wed Feb 04, 2004 11:36 pm    Post subject:
Reply with quote

In a binary search the table element key values must be in ascending or descending sequence. The table is 'halved' to search for equal to, greater than or less than conditions until the element is found. In a sequential search the table is searched from top to bottom, so (ironically) the elements do not have to be in a specific sequence. The binary search is much faster for larger tables, while sequential works well with smaller ones. SEARCH ALL is used for binary searches; SEARCH for sequential.

Manohar.
Back to top
View user's profile Send private message
suresh_u

New User


Joined: 31 Jan 2004
Posts: 8

PostPosted: Fri Feb 06, 2004 3:18 pm    Post subject:
Reply with quote

dear vinayak,

Please put subject line properly so that persons who are familiar in those subjects will be able to help you immediatly.
please don't put generalized subject like 'question' to any of your mails.


Thanks
suresh
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm
No new posts Missing Java main class akg Java & MQSeries 3 Wed May 25, 2016 4:05 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Cobol Sub-Program and Main-Program Chetan Kumar Mainframe Interview Questions 7 Sat Oct 17, 2015 10:48 am
No new posts Copy one PDS to another PDS based on ... alluri12 JCL & VSAM 10 Tue Sep 29, 2015 8:10 pm


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