File Handling Interview Questions
What is file handling in COBOL?
The process of file handling refers to how we access and store the data or info in a file with the help of a program.
What is fields in files?
The field is the name for the meaningful information in the record. The name refers to variables in a record structure.
What is a record in COBOL?
A record is a collection of related fields representing as a single entity. One or more fields together form a record.
What is physical record in COBOL?
One line in the file is one physical record.
What is Logical record in COBOL?
A logical record is the record layout that is used by the COBOL program. Only one record can be processed at a time by the program.
What is file in COBOL?
A file is a collection of records given a name and permanently stores the data on secondary memory (e.g., DISKs, TAPEs).
Explain life cycle of a file in programming?
Below are the file processing statements -
- File Declaration
- OPEN File
- Processing file
- CLOSE File