Before your ILE COBOL program can read or write to the devices on the system, a device description that identifies the hardware capabilities of the device to the operating system must be created when the device is configured. A device file specifies how a device can be used. By referring to a specific device file, your ILE COBOL program uses the device in the way that it is described to the system. The device file formats output data from your ILE COBOL program for presentation to the device, and formats input data from the device for presentation to your ILE COBOL program.
You use the device files listed in Table 22 to access the associated externally attached devices:
Table 22. Device files and their associated externally attached devices
Device File | Associated Externally Attached Device | CL commands | ILE COBOL Device Name | ILE COBOL Default File Name |
---|---|---|---|---|
Printer Files | Provide access to printer devices and describe the format of printed output. | CRTPRTF CHGPRTF OVRPRTF | PRINTER FORMATFILE | QPRINT |
Tape Files | Provide access to data files which are stored on tape devices. | CRTTAPF CHGTAPF OVRTAPF | TAPEFILE | QTAPE |
Diskette Files | Provide access to data files which are stored on diskette devices. | CRTDKTF CHGDKTF OVRDKTF | DISKETTE | QDKT |
Display Files | Provide access to display devices. | CRTDSPF CHGDSPF OVRDSPF | WORKSTATION |
|
ICF Files | Allow a program on one system to communicate with a program on another system. | CRTICFF CHGICFF OVRICFF | WORKSTATION |
|
The device file contains the file description, which identifies the device to be used; it does not contain data.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.