Multiple choice technology mainframe

Is it possible to read and write the same file in COBOL?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In COBOL, you can read and write the same file by opening it in I-O mode (Input-Output mode). This allows both READ and WRITE operations on the same file within the same program. You must ensure proper file positioning and record handling to avoid conflicts. This is commonly used for updating files in place.