Reading and writing data is an essential part of every program. Your program retrieves information, processes it as you request, and then produces the results.
The source of the information and the target for the results can be one or more of the following items:
The information as it exists on an external device is in a physical record or block, a collection of information that is handled as a unit by the system during input or output operations.
Your COBOL program does not directly handle physical records. It processes logical records. A logical record can correspond to a complete physical record, part of a physical record, or to parts or all of one or more physical records. Your COBOL program handles logical records exactly as you have defined them.
In COBOL, a collection of logical records is a file, a sequence of pieces of information that your program can process.
related concepts
File organization and input-output devices