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

Which mode used to open the sequential file for sequential reading?

INPUT

Which mode used to open the sequential file for writing?

OUTPUT

Which mode used to open the sequential file for rewriting?

I-O

Does the record deletion possible in sequential file?

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

What is the mode used to append the record in sequential file?

EXTEND

Indexed Files –

Which mode is used to operate the indexed file?

The list of indexed file opening modes are -

  • INPUT
  • OUTPUT
  • I-O

Which mode used to open the indexed file for sequential reading?

INPUT

Which mode used to open the indexed file for writing?

OUTPUT

Does the record deletion possible in indexed file?

Yes

Which mode used to open the indexed file for record rewriting or deletion?

I-O

What is the access method used to browse the index file?

INPUT

Realtive Files –

Which mode is used to operate the relative file?

The list of relative file opening modes are -

  • INPUT
  • OUTPUT
  • I-O

Which mode used to open the relative file for sequential reading?

INPUT

Which mode used to open the relative file for writing?

OUTPUT

Does the record deletion possible in relative file?

Yes

Which mode used to open the relative file record rewriting or deletion?

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?

What is the access method used to browse the index file?

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

What is the access method used to browse the relative file?