Module 9: Array processing and Table handling
ARRAY (or TABLE)
- An array is group of similar-typed data items that are referred to by common data-name
- In COBOL, you can define array of any data-type
- Array may have one or more dimensions. COBOL-74 supports maximum 3 dimensions whereas COBOL-85 supports maximum of 7 dimensions
- In COBOL, array can be defines as group or elementary item
- OCCURS clause is used to define array
- Single-dimension Array
- OCCURS clause
- Two–dimensional Array
- SUBSCRIPT
- ARRAY INDEX and INDEXING
- SET verb
- SEARCH (Sequential/Linear search)
- SEARCH ALL (Binary search)
- Comparison between SEARCH and SEARCH ALL