IBM AS/400 Frozen Dessert Maker User Manual


 
Types of Device Files
Chapter 17. Accessing Externally Attached Devices
You can access externally attached devices from RPG by using device files.
Device files are files that provide access to externally attached hardware such as
printers, tape units, diskette units, display stations, and other systems that are
attached by a communications line.
This chapter describes how to access externally attached devices using RPG
device names PRINTER, SEQ, and SPECIAL. For information on display stations
and ICF devices see Chapter 18, “Using WORKSTN Files” on page 331
Types of Device Files
Before your 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 RPG program uses
the device in the way that it is described to the system. The device file formats
output data from your RPG program for presentation to the device, and formats
input data from the device for presentation to your RPG program.
You use the device files listed in Table 22 to access the associated externally
attached devices:
The device file contains the file description, which identifies the device to be used;
it does not contain data.
Table 22. AS/400 Device Files, Related CL commands, and RPG Device Name
Device
File
Associated Externally Attached Device CL com-
mands
RPG
Device
Name
Printer
Files
Provide access to printer devices and
describe the format of printed output.
CRTPRTF
CHGPRTF
OVRPRTF
PRINTER
Tape Files Provide access to data files which are
stored on tape devices.
CRTTAPF
CHGTAPF
OVRTAPF
SEQ
Diskette
Files
Provide access to data files which are
stored on diskette devices.
CRTDKTF
CHGDKTF
OVRDKTF
DISK
Display
Files
Provide access to display devices. CRTDSPF
CHGDSPF
OVRDSPF
WORKSTN
ICF Files Allow a program on one system to com-
municate with a program on the same
system or another system.
CRTICFF
CHGICFF
OVRICFF
WORKSTN
Copyright IBM Corp. 1994, 1999 315