The effect of REDUCE on FILE
These examples show the effect of FILE FROM and TO on REDUCE BOUNDARY and INTERVAL.
Example 1
ACCOUNTING
REDUCE
BOUNDARY (30)
INTERVAL (60)
REPORT
FROM (, 9:00:00)
TO (,12:00:00)
FILE
FROM (,12:00:00)
TO (,17:00:00)
The data that is available for filing, as with reducing, is influenced first by the GLOBAL command. If you specify FROM and TO dates and times in GLOBAL, all records outside those dates and times are discarded before reducing or filing.
The data that is available for filing is also influenced by the REDUCE subcommand. If you specify FROM and TO dates and times in REDUCE, all records outside those dates and times are unavailable to subsequent FILE subcommands. In this example, no GLOBAL command is in effect and no times are specified for REDUCE, so all records in the input data are available to FILE. The data that is available for filing is not restricted by INTERVAL or BOUNDARY.
The ACCOUNTING FILE subcommand specifies data from 12:00:00 to 15:00:00.
No dates are specified, so all dates are included.
Example 2
ACCOUNTING
REDUCE
FROM (,10:00)
TO (15:00)
REPORT
FROM (,10:00)
TO (15:00)
FILE
FROM (,09:00)
TO (17:00)
In Example 2, the FILE FROM time is before the REDUCE FROM time and the FILE TO time is after the REDUCE TO time. The file contains records that are written at or after 10:00:00 and before 15:00:00.
No dates are specified, so all dates are included. The data that is available for filing is limited by the REDUCE FROM and TO times (10:00:00 to 15:00:00). The requested times do not reflect the actual content of the file.
In Example 2, the first Accounting record after 10:00:00 is at 12:15:00. The file includes the eight Accounting records between the REDUCE FROM and TO times.