Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between SEARCH and SEARCH ALL? What
is more efficient?

Answers were Sorted based on User's Feedback



What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / basha, margadarsi comp

SEARCH is a sequential search, it will read all the elements
of a table sequentially whereas SEARCH ALL, it will splits
the table in two halves and search the element in which half
the element find like that the entire table will be searche
and also the table should be in sorted order for SEARCH ALL.
SEARH ALL is more efficient than SEARCH.

Is This Answer Correct ?    45 Yes 1 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / avinanda mukherjee

Ans #1 is corrent, in addition, Search all is working in a
sorted array(binary search) and it is more effiecient then
verb search.

Is This Answer Correct ?    24 Yes 2 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / kumar raja.

1st answer is 100% correct.

Search
The search statement examines the table elements in a
sequential manner.this technique is called linear search.

Search-All
Is a binary search begins the examination of the elements
from the middle and in each examination it eliminates the
half the elements remaining to be searched.its applicable
only for sorted table.

Is This Answer Correct ?    14 Yes 1 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / vidhya

Search All is more efficeint provided the input is in the
sorted order

Is This Answer Correct ?    11 Yes 1 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / sunrays

multiple when conditions can be used in search.
in search all single when condition should be used.

in search SEARCH key word is used.
in search-all SEARCH ALL key word is used.

table may not be in sorted order for search.
table must be in sorted order.

search is a linear search. search all is binary search.

Is This Answer Correct ?    11 Yes 2 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / ramana

most of the pionts are covered so far, I would like to add
one more point here,

In search all to get expected results array must be in a
specified order, but search all also works for an unsorted
array but may or may not give the expected results as it
keeps on divide.

Ex1: searching for 10. ** Array is not in order**

40
30
34
70
10
90

Iteration 1: it selects the second half 70,10,90
Iteration 2: It selects 10 n says the value is found.

Ex2: searching for te same 10.

40
10
34
70
30
90

Its follows the same process as in 1st case, but here 10 is
not there in the second iteration so it says value not
found, but it is present in the first half, this happens
because aray is not sorted.

Is This Answer Correct ?    2 Yes 1 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / kumar raja.

SEARCH ALL is an efficient one then why we need SEARCH ?

ONE EXAMPLE.

In VSAM files by passing the partial key we can search the
record using SEARCH or AEARCH ALL
But if you would like to point out 1st record with this
partial key, SEARCH will find the 1st record with that
partial key.
And SEARCH ALL will not. (95%)

Example. (Here my target to get 1st record with the
partial key. i.e (200 300 XXXXXXA)

VSAM File. (assume KEY as : ORG LOGO ACCOUNT) and
partial KEY (ORG = 200 LOGO = 300)
ORG LOGO ACCOUNT

100 222 XXXXXXXXX
100 333 XXXXX
111 333 XXXXXXX
200 300 XXXXXXA
200 300 XXXXXXB
200 300 XXXXC
200 300 XXXXXXD
250 300 XXXXXXX
300 340 XXXXXXX

In the case of search the O/P will be (200 300 XXXXXA)
Correct as per the requirement.
But in case of SEARCH ALL the response will be (200 300
XXXXXB). Wrong as per the requirement.

Regards,
Kumar Raja.

Is This Answer Correct ?    3 Yes 4 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / cvcv

searchall is only for 1-d arrays

Is This Answer Correct ?    3 Yes 4 No

What is the difference between SEARCH and SEARCH ALL? What is more efficient?..

Answer / laxmanrao

1)any relation operator can used in search
where as in searchall we use only equalto(=)operator only
2)multiple-when condition can used in search,where as in
search all we use only single when condition is used
3)search is efficient then perform ,search all is efficient
then perform

for detail about job fresher check in
http://jobplacementconsultantsinworld.blogspot.com

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More COBOL Interview Questions

If I want to increase the Limit in GDG. What should I do?

1 Answers   IBM,


What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. 05 MM PIC 99. 05 YY PIC 99. (a) Nothing is wrong. (b) Under W-DATE all level 05 items are having a PIC 99 but level 01 has PIC X(6). (c) PIC can't be specified for a group item. (d) DD, MM, and YY are invalid datanames.

6 Answers   Mphasis, TCS,


In INITIALIZE what is Repalcing Word will do

1 Answers   CTS,


2)Where the Plan is located in CICS-DB2?

1 Answers   IBM,


what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?

2 Answers   Satyam,


How to increase the logical record length of existing PS file?

7 Answers  


Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?

1 Answers  


What is the default value of DISP for temp datasets

5 Answers   IBM,


What is the difference between a binary search and a sequential search?

3 Answers  


What is the difference between a subscript and an index in a table definition?

3 Answers   TCS,


I have a occurs for 100 times but it has executed 101 time what could be the reason?

4 Answers  


What is the LINKAGE SECTION used in COBOL?

0 Answers   UGC Corporation,


Categories