This part specifies the type of device that the file will use. The compiler
can then check whether the file is described and used in a consistent manner.
See the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide for further information.
Note: - The compiler does not check whether the device associated with the external
file is of the type specified in the device portion of assignment-name-1 or
literal-1.
- The compiler provides no diagnostics unless the I-O verbs were used in
an inconsistent manner.
- When the program runs, the operating system could either issue an escape
message or ignore the function if it was not applicable to the device. For
further information on overriding files, refer to the File Systems and Management section of the Database
and File Systems category in the IBM® i
Information Center at this Web site - http://www.ibm.com/systems/i/infocenter/.
IBM Extension
The device that the file will use can be changed at run
time with the OVRxxxF CL command. To ensure consistent results, the device
type associated with the file should correspond to that given in the assignment-name.
End of IBM Extension
Device can be any of the following:
- Device
- Associated file
- PRINTER
- PRINTER should be specified for program described printer files only.
- FORMATFILE
- FORMATFILE should be specified for externally described printer files
only. For more information on how to use externally described printer files
see the section on FORMATFILE files in the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide.
- TAPEFILE
- Tape file
- DISKETTE
- Diskette file
- DISK
- Any physical database file or single format logical database file. When
DISK is the device, database extensions cannot be used, but dynamic file creation
is supported. See the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide for more information about DISK
files. See OPEN Statement Considerations for information about Dynamic File Creation.
- DATABASE
- Any database file (or DDM file). When DATABASE is the device, externally
described data and database extensions can be used, but dynamic file creation
is not supported.
- WORKSTATION
- Display file or ICF file.