What is binary search?
Answers were Sorted based on User's Feedback
Answer / sachin
Prefer when the table size is significantly large.
When the size of the table is large and it is arranged in
some sequence -either ascending or descending on search
field, then BINARY SEARCH would be the efficient method.
Table should be in sorted order of the searching argument.
There should be ASCENDING/DESCENDING Clause.
Index need not be set to 1 before SEARCH ALL.
Compare the item to be searched with the item at the
center. If it matches fine, else repeat the process with
the left or right half depending on where the item lies.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ravi
Binary search...sequential search..must be in an sirted
order..it divides the table in to 2 parts
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / vidhya
Serial search is most cost-effective up to 70 rows, If the
table has more than 70 rows then Binary search is effecient.
The table should be in ascending or descending order
Is This Answer Correct ? | 1 Yes | 0 No |
How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.
Explain about Redefines cluse?
What is SSRANGE, NOSSRANGE ?
What is an in line perform? When would you use it? Anything else you wish to say about it.
if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.
what happens if we dont close cursor in db2-cobol pgm?
wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?
can we display comp-3 variables. if we want to display what we have to do . give me one example
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.
explain sorting techniques in cobol program?
what is scope terminator
COMP field occupy ?