FORCE (Force a Certain File to Be Read Next Cycle)

Free-Form Syntax FORCE file-name
Code Factor 1 Factor 2 Result Field Indicators
FORCE file-name

The FORCE operation allows selection of the file from which the next record is to be read. It can be used only for primary or secondary files.

The file-name operand must be the name of a file from which the next record is to be selected.

If the FORCE operation is processed, the record is read at the start of the next program cycle. If more than one FORCE operation is processed during the same program cycle, all but the last is ignored. FORCE must be issued at detail time, not total time.

FORCE operations override the multi-file processing method by which the program normally selects records. However, the first record to be processed is always selected by the normal method. The remaining records can be selected by FORCE operations. For information on how the FORCE operation affects match-field processing, see Figure 8.

If FORCE is specified for a file that is at end of file, no record is retrieved from the file. The program cycle determines the next record to be read.

For more information, see File Operations.



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