Once you have named the sequential file in the Environment Division, you must then describe the file through a file description entry in the Data Division. See WebSphere Development Studio: ILE COBOL Reference for a full description of the File Description Entry. Use the Format 2 File Description Entry to describe a sequential file that is accessed through a diskette file.
Diskette files have no data description specifications (DDS). A sequential file that is stored on a diskette device must be a program-described file. Your ILE COBOL program must describe the fields in the record format so the program can arrange the data received from or sent to the diskette device in the manner specified by the diskette file description.
A simple file description entry in the Data Division that describes a sequential file that is accessed through a diskette file looks as follows:
FD sequential-file-name. 01 sequential-file-record. 05 record-element-1 PIC ... . 05 record-element-2 PIC ... . 05 record-element-3 PIC ... .
·
·
·
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.