COBOL input-output statements transfer data to and from files stored on external media, and also control low-volume data that is obtained from or sent to an input/output device.
In COBOL, the unit of file data made available to the program is a record. You need only be concerned with such records. Provision is automatically made for such operations as the movement of data into buffers, internal storage, validity checking, error correction (where feasible), blocking and deblocking, and volume-switching procedures.
The description of the file in the environment division and data division governs which input-output statements are allowed in the procedure division. Permissible statements for each type of file organization are shown in Permissible statements for sequential files (Table 49) and Permissible statements for indexed and relative files (Table 50).