What are the different rules to perform a search in COBOL?
While applying the SEARCH statement, users must abide by these following rules:
- This statement can only be applied to a Table only if it has been indexed using the INDEXED BY statement.
- The index must be initialized using the SET operator.
- This statement cannot be used for finding multiple matches.
- The SEARCH statement can be only used for doing a sequential or serial search of the table.
- If the search process reaches the end of an array, automatically the end statement will be executed.
BY Best Interview Question ON 06 May 2020