Previous Topic: Reporting Facility Modes of OperationNext Topic: Secondary Mode


Primary Mode

The Primary mode is the most frequently entered mode of operation and is best suited for report generation. It provides methods for resequencing input data or generating multiple reports.

There are four main processes performed in Primary mode:

Compilation/Code Generation

The Reporting Facility compiler analyzes the input source commands and generates machine code to perform the specified function. The system stores machine code, with the GSA, on the DRWORK file to be recalled later and used for execution.

Record Selection/Data Manipulation

The system recalls and executes the portion of the machine code on the DRWORK file responsible for performing presort functions. This includes the reading of input files, conditional record selection, and presort data movement, if necessary. As each of the input record sets are selected for processing, the system generates one or more records on the internal Hit File. Each record contains only the data required to print the final reports and the necessary sort control information.

Sort

After all input record sets have been processed, the Reporting Facility enters end-of-job processing, closes the Hit File, and invokes the sort program.

Report Generation

The system recalls and executes the machine code responsible for report printing. The system generates this machine code to read the sorted Hit File and produce the output report.

In Primary mode, a single pass of the input data files can produce multiple reports, with each report printed in a different sequence and containing different data.

The following data sets are required when executing the Reporting Facility in Primary mode: