File Open Statement Interview Questions


What is the open statement in COBOL?

OPEN statement establishes a connection between the logical file and its associated physical file.

What are the file opening modes in COBOL?

The list of file opening modes are -

  • INPUT
  • OUTPUT
  • I-O
  • EXTEND

Sequential Files –

Which mode is used to operate the sequential file?

The list of sequential file opening modes are -

  • INPUT
  • OUTPUT
  • I-O
  • EXTEND

Does the record deletion possible in sequential file?

No. Logical deletion is possible which overrides the record data with spaces.

Indexed Files –

Which mode is used to operate the indexed file?

The list of indexed file opening modes are -

  • INPUT
  • OUTPUT
  • I-O

Realtive Files –

Which mode is used to operate the relative file?

The list of relative file opening modes are -

  • INPUT
  • OUTPUT
  • I-O

Frequently Asked Questions -

List the various OPEN modes present in COBOL?
What are the different modes of file opening in COBOL?
What are different file OPEN modes available in COBOL?

What mode is the sequential file operated on?

Which mode used to open the indexed file for random reading?
Which mode used to open the indexed file for dynamic reading?

Which mode used to open the relative file for random reading?
Which mode used to open the relative file for dynamic reading?