adspace


What are various search techniques in cobol? Explain.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

i need a small 3d program using inline and outline.

2311


Are you comfortable in cobol or jcl?

1116