Multiple choice technology mainframe

Which of the following statements concerning files are true?

  1. the FD entry in the DATA DIVISION gives a description of the structure of a file.

  2. the first record is automatically read on opening a file.

  3. if a file is opened in I-O mode you can use this file for reading as well as for writing.

  4. you can not read indexed files from a COBOL program.

  5. in the SELECT clause you have to give a complete description of the exact location of the file.

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

Option A is true: The FD (File Description) entry in the DATA DIVISION describes the file's record structure, including field definitions and sizes. Option C is true: I-O mode allows both reading and writing to the same file, enabling update operations. Option B is false: Opening a file does NOT automatically read the first record; explicit READ statements are required. Option D is false: COBOL programs CAN read indexed files; indexed file organization is fully supported. Option E is false: The SELECT clause assigns a file name and organizational attributes, but the physical location is typically defined externally (JCL, environment variables, or system catalogs).