ILE COBOL Programmer's Guide

Naming Files Stored on Diskette Devices

To use a sequential file that is stored on a diskette device, in your ILE COBOL program, you must name the file through a file control entry in the FILE-CONTROL paragraph of the Environment Division. See WebSphere Development Studio: ILE COBOL Reference for a full description of the FILE-CONTROL paragraph.

You name the file in the FILE-CONTROL paragraph as follows:

FILE-CONTROL.
    SELECT sequential-file-name
        ASSIGN TO DISKETTE-diskette_device_name
        ORGANIZATION IS SEQUENTIAL.

You use the SELECT clause to choose a file. This file must be identified by a FD entry in the Data Division.

You use the ASSIGN clause to associate the file with a diskette device. You must specify a device type of DISKETTE in the ASSIGN clause to use a diskette file.

Use ORGANIZATION IS SEQUENTIAL in the file control entry when you name a file that you will access through a diskette file.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]