RPG/400 Help

Positions 40-46 (Device)

Entry
Explanation
PRINTER
File is a printer file, a file with control characters that can be sent to a printer.
DISK
File is a disk file. This device supports sequential and random read/write functions. These files can be accessed on a remote system by Distributed Data Management (DDM).
WORKSTN
File is a workstation file. Input/output is through a display or ICF file.
SPECIAL
This is a special file. Input or output is on a device that is accessed by a user-supplied routine. The name of the routine must be specified in positions 54 through 59. A parameter list is created for use with this routine, including an option code parameter and a status code parameter. The file must be a fixed unblocked format.
SEQ
File is a sequentially organized file. The actual device is specified in a CL command or in the file description, which is accessed by the file name.

Use positions 40 through 46 to specify the RPG/400 device name to be associated with the file. On the AS/400 system the file name in positions 7 through 14, rather than the device name specified in positions 40 through 46, is used to point to the file. The RPG/400 device name defines the RPG/400 functions that can be done on the associated file. Certain functions are valid only for a specific RPG/400 device name, such as the EXFMT operation for WORKSTN. The file name specified in positions 7 through 14 can be overridden at compilation time or run time, allowing you to change the input/output device used in the program.

Note that the RPG/400 device names are not the same as the system device names.


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