COBOL Input Output Statements
COBOL input-output statements are used to transfer data to and from external media, as well as to control low-volume data obtained from or sent to input/output devices.
COBOL automatically manages various operations, such as moving data into buffers, storing it internally, checking for validity, correcting errors (when possible), and handling blocking and deblocking procedures, as well as volume-switching procedures.
To be precise, input-output statements manage data transfer between the program's internal storage and external input or output devices. They enable functions like reading input or writing output at runtime.
The input-output statements are –
Statements | Description |
---|---|
ACCEPT Statement Detailed Tutorial | ACCEPT statement receives the data from external sources like JCL or the system runtime environment during the program execution. It places the received information into the variable coded with it. |
DISPLAY Statement Detailed Tutorial | DISPLAY statement is used to print the variable contents to the output device. The contents are displayed from left to right on the output device. |
