Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Coding input-output statements for line-sequential files

Code the input and output statements shown below to process a line-sequential file.

OPEN
To initiate the processing of a file.

You can open a line-sequential file as INPUT, OUTPUT, or EXTEND. You cannot open a line-sequential file as I-O.

READ
To read a record from a file.

With sequential processing, a program reads one record after another in the same order in which the records were entered when the file was created.

WRITE
To create a record in a file.

A program writes new records to the end of the file.

CLOSE
To release the connection between a file and the program.

related references  
OPEN statement (Enterprise COBOL Language Reference)  
READ statement (Enterprise COBOL Language Reference)  
WRITE statement (Enterprise COBOL Language Reference)  
CLOSE statement (Enterprise COBOL Language Reference)


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)