6.137 ROLLOVER

Valid For

Extract

Description

Use the ROLLOVER parameter to specify the interval at which trail files are aged and new ones are created. ROLLOVER is global and applies to all trails defined with RMTTRAIL or RMTFILE statements in a parameter file.

Use ROLLOVER to create trail files that represent distinct periods of time (for example, each day). It facilitates continuous processing while providing a means for organizing the output. It also provides a means for organizing batch runs by deactivating one file and starting another for the next run.

Files roll over between transactions, not in the middle of one, ensuring data integrity. Checkpoints are recorded when files roll over to ensure that previous files are no longer required for processing.

Rollover occurs only if the rollover conditions are satisfied during the run. For example, if ROLLOVER ON TUESDAY is specified, and data extraction starts on Tuesday, the rollover does not occur until the next Tuesday (unless more precise ROLLOVER rules are specified). You can specify up to 30 rollover rules.

Either the AT or ON option is required. Both options can be used together, and in any order. Using AT without ON creates a new trail file at the specified time every day.

A trail sequence number can be incremented from 000001 through 999999, and then the sequence numbering starts over at 000000.

Default

Roll over when the default file size is reached or the size specified with the MEGABYTES option of the ADD RMTTRAIL or ADD EXTTRAIL command is reached.

Syntax

ROLLOVER {AT hh:mi | ON day | AT hh:mi ON day} [REPORT]
AT hh:mi

The time of day to age the file.

Valid values:

  • hh is based on a 24-hour clock, with valid values of 1 through 23.

  • mi accepts values from 00 through 59.

ON day

The day of the week to age the file.

Valid values:

SUNDAY
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY

The values are not case-sensitive.

REPORT

Generates a report for the number of records extracted from each table since the last report was generated. The report represents the number of records output to the corresponding trail unless other reports are generated by means of the REPORT parameter.

Examples

Example 1   

The following ages trails every day at 3:00 p.m.

ROLLOVER AT 15:00
Example 2   

The following ages trails every Sunday at 8:00 a.m.

ROLLOVER AT 08:00 ON SUNDAY