When you write a report request using a file that has missing segment instances, the missing instances affect how data is retrieved. That is because FOCUS will omit a parent instance without a child instance if the report request specifies fields in both the parent and child segments. It makes no difference whether the specified fields are display fields or sort fields.
For example, in the Payment History (PH) file, the payment segment is the parent of the deduction segment. Since not all payments have associated deductions, the PH file has missing child (deduction) instances. So, if you write a report request that sums gross pay (located in the parent segment) and deduction amounts (located in the child segment), then payments without deductions are omitted from the report. To include all parent instances, use the following options:
You can include parent instances with missing decedents, by entering the SET ALL = PASS command before the TABLE FILE command. When the SET ALL = PASS command is active, and the report request screens on a field that resides in a child segment, then all parent instances are included whether or not it has a child instance that meets the criteria. For this reason, we recommend using this command only if there are no screening statements in the report request. For example, the request below will include all gross pay amounts, including amounts from payments without any associated deductions.
set all = pass
table file ph
By default, the SET ALL = PASS command is set to OFF.
If used, the SET ALL = PASS command is active during the entire FOCUS session and may affect other report requests executed in the same FOCUS session.
To turn this command off during a FOCUS session, issue the command: SET ALL = OFF.
You can use the MATCH command to include all parent instances and match that data to the child instances. A match request can be used to gather data from each segment, independent of the other, and then combine the gathered data. The MATCH command can be used with or without screening statements. For example, the request below would include all gross pay amounts from all payments with or without child instances, but would only sum deduction amounts for tax sheltered annuities.
MATCH FILE PH
IF PH:DEDTYPE EQ TC
AFTER MATCH HOLD AS PERMSML
When a MATCH is used, screening statements apply only to the particular segment where they are used.
For more information on the MATCH command, refer to your FOCUS documentation or the Advanced Reporting Agenda & Modules.
Last Updated: March 3, 2005