What are various search techniques in cobol? Explain.



What are various search techniques in cobol? Explain...

Answer / Shabnam Parween

COBOL offers several search techniques to access and manipulate data:

1. Linear Search (SEARCH): Linear search traverses the entire array or list to find a specific element. It is simple but inefficient for large datasets.

2. Binary Search (IS-REACHED): Binary search reduces the search space by repeatedly dividing the dataset in half, making it faster than linear search for sorted arrays. However, it requires the array to be sorted beforehand.

3. Hash Table Search: A hash table stores data in an array using a hashing function that converts key values into indices. The average search time is constant, making this method efficient for large datasets.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

) how do u code after getting data?

1 Answers   IBM,


how do you define single dimensional array and multidimensional array in your cobol?

1 Answers  


Hi................... I have records like this aaaa cccc bbbb And i want output like this bbbb cccc aaaa How can it possible ?. Note:Please make sure records are in unsorted order. somebody plzzz help me.

1 Answers  


In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


I want ALL jcl ERROR cods

1 Answers  


Mention the guidelines to write a structured cobol program?

1 Answers  


What are the situations u have used in ur project for Subcript and Index ? 1.if u use Subscript why not Index,why u choose Subscript only? 2.if u use Index why not Subscript,what abt Displacement?

2 Answers   Cap Gemini,


In INITIALIZE what is Repalcing Word will do

1 Answers   CTS,


What is inspect in cobol ?

1 Answers   Infosys,


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1 Answers  


Why occurs can not be used in 01 level ?

2 Answers   TCS,


give the examples for strings and unstrings in cobol

2 Answers   IBM,


Categories