Program Control of File Processing

Specify a full procedural file (F in position 18 of the fixed-form file description specifications, or any file defined by a free-form file definition) to control all or partial input of a program. A full procedural file indicates that input is controlled by program-specified calculation operations (for example, READ, CHAIN). When both full procedural files and a primary file (P in position 18 of the file description specifications) are specified in a program, some of the input is controlled by the program, and other input is controlled by the cycle. Even if the program cycle exists in your module, all the processing of a full-procedural file is done in your calculations.

The file operation codes can be used for program control of input. These file operation codes are discussed in File Operations.

Figure 1. Programmer Control of Input Operation within the Program-Cycle
This figure illustrates Programmer Control of Input Operation within the Program-Cycle
Figure 2. Detail Flow of RPG IV Exception/Error Handling Routine
This figure illustrates Routine