Your COBOL program is reading records from a file, and you want to specify actions to be taken when invalid data is encountered. Which phrase should you use with the READ verb?
- AT END
- END-OF-FILE
- INVALID KEY
- NOT INVALID
In COBOL, the phrase "INVALID KEY" is used with the READ verb to specify actions to be taken when invalid data is encountered during a file read operation. This allows the program to handle data validation errors gracefully and take appropriate actions based on the encountered condition.
Loading...
Related Quiz
- How does the PERFORM UNTIL statement differ from the PERFORM VARYING statement in COBOL?
- When working with COBOL and databases, the _____ clause is used to specify the host variable's data type for SQL statements.
- In COBOL, what is the primary purpose of using VSAM and ISAM files?
- What is the purpose of arithmetic operations in COBOL programs?
- Explain how COBOL handles file locking and multi-user access when using the "I-O" mode.