You are developing a COBOL program that reads data from an existing file and updates specific records. Which file access mode should you choose for this operation?
- EXTEND
- I-O
- INPUT
- OUTPUT
In this scenario, the correct file access mode is I-O (Input-Output). This mode allows both reading and updating of records in an existing file. It is suitable for situations where data needs to be read and modified within the same program.
Loading...
Related Quiz
- How can you implement error recovery strategies in a COBOL program to minimize data loss during exceptions?
- In COBOL, the RECORD CONTAINS _____ clause is used to specify the total size of a record in the FILE SECTION.
- When working with indexed files in COBOL, what is the key used for accessing records?
- In COBOL, the "UNSTRING" statement can generate an "OVERFLOW" exception if the result field is _____.
- In a COBOL program, you are not getting the expected results, and you suspect it's due to a logic error. Describe the steps you would follow to debug and correct the issue.