IBM AS/400 Frozen Dessert Maker User Manual


 
Using Sequential Files
Accessing Display Devices
You use display files to exchange information between your program and a display
device such as a workstation. A display file is used to define the format of the infor-
mation that is to be presented on a display, and to define how the information is to
be processed by the system on its way to and from the display.
See Chapter 18, “Using WORKSTN Files” on page 331 for a discussion on how to
use WORKSTN files.
Using Sequential Files
Sequential files in an ILE RPG program associate with any sequentially organized
file on the AS/400 system, such as:
Database file
Diskette file
Printer file
Tape file.
The file name of the SEQ file in the file description specifications points to an
AS/400 file. The file description of the AS/400 file specifies the actual I/O device
e.g. tape, printer and diskette.
You can also use the CL override commands, for example OVRDBF, OVRDKTF
and OVRTAPF, to specify the actual I/O device when the program is run.
Specifying a Sequential File
A sequential (SEQ) device specification, entered in positions 36 through 42 in the
file description specification, indicates that the input or output is associated with a
sequentially-organized file. Refer to Figure 162 on page 327. The actual device to
be associated with the file while running the program can be specified by a OS/400
override command or by the file description that is pointed to by the file name. If
SEQ is specified in a program, no device-dependent functions such as space/skip,
or CHAIN can be specified.
The following figure shows the operation codes allowed for a SEQ file.
Note: No print control specifications are allowed for a sequential file.
Table 26. Valid File Operation Codes for a Sequential File
File Description Specifications
Positions
Calculation Specifications Positions
17 18 26-35
I P/S CLOSE, FEOD
I F READ, OPEN, CLOSE, FEOD
O WRITE, OPEN, CLOSE, FEOD
326 ILE RPG for AS/400 Programmer's Guide