Step 3: Define reports using report definitions
Creating a report definition is step 3 in the greater task of setting up reports. A report definition provides criteria for generating a custom report, a basic report, or indexed report pages from an archived SYSOUT, as follows:
- If a report definition specifies condition entries (field-operator-value conditions), Output Manager creates a custom report that contains a filtered subset of the SYSOUT that matches the conditions.
- If a report definition specifies an index that is composed of one to eight report fields, Output Manager creates field indexes (index records) that point directly to the report pages that contain all of the specified index fields.
- If a report definition specifies both condition entries and an index, Output Manager processes the condition entries first and only generates field indexes for pages that are included in the custom report.
- If a report definition contains neither condition entries nor an index, Output Manager creates a basic report that contains the all of the contents of the SYSOUT.
A report definition for a custom report or indexed report works in conjunction with a layout. A layout provides information about the physical arrangement of the report, as produced by an application. The layout must specify the locations of any condition entry fields or index fields within the report SYSOUT.
Output Manager can automatically generate a report definition for a basic report based on the SYSOUT selection rules (selector rule and report selection rule). A generated report definition contains no condition entries or index fields and has the description "Dynamically created by Output Manager" in the interface. You can link a distribution list, report banner page, or PRSET member to a dynamically created report definition, if necessary.
Usually, report administrators define more than one custom report per basic report. This practice enables them to create reports that are tailored to the needs of their report users. For example, if each branch of a bank requires a custom report that contains summary transaction data for only that branch, the report administrator would create a separate custom report definition for each branch.
When a SYSOUT matches the job selection criteria in a report selection rule, Output Manager reads into memory all of the report definitions that are associated with the report selection rule by means of a common layout name or report name or both. Output Manager also reads into memory any layouts that are linked to the report definitions.
Output Manager then compares each page of a SYSOUT to the criteria in the report definitions and layouts (if present) to determine if a page is part of a defined report. The following results can occur:
- If one or more pages match the condition entries in a custom report definition, and the condition entry type specifies to include those pages, the pages are included in a custom report.
- If one or more pages match the condition entries in a custom report definition, and the condition entry type specifies to exclude those pages, the pages are not included in the custom report.
- If one or more pages contain all of the fields that were defined for an index and at least the first index field has a nonblank value, a field index (index record) that points to that set of report pages is generated.
- If one or more pages do not match any condition entries in any of the custom report definitions, Output Manager generates an undefined report that contains all of the unused pages from the SYSOUT.