SQLFORMATDISCARDROLLOVER
Valid For
Replicat
Description
Use SQLDISCARDROLLOVER to specify when a SQL discard file is aged and a new one is created. Old files are renamed in the format of group_name(n), where group_name is the name of the Replicat group and(n) is a number that gets incremented by one each time a new file is created, for example: $DATA.ACRPT.SQLDIS0, $DATA.ACRPT.SQLDIS1, $DATA.ACRPT.SQLDIS2, and so forth.
Either the AT or ON option can be entered, or both options can be used together. The following rules apply to the possible variations in entries:
-
Entering
ATwith a time but without a day creates a new discard file at the specified time every day. -
Entering
ATwithout a time generates an error. -
Entering
ONwith a day but without a time creates a new discard file at midnight on the specified day. -
Entering
ONwithout a day will generate an error. -
If no option is entered, the discard file will roll over at midnight every night.
To have more than one rollover, enter multiple AT, ON, or AT ON options. Up to 30 will be used.
Default
No rules. File is not rolled over unless it reaches the edit file maximum line count of 98000.
Syntax
SQLFORMATDISCARDROLLOVER {
AT hh:mm |
ON day-of-week |
AT hh:mm ON day_of_week
}
AT hh:mm
The time of day to age the file based on a 24-hour clock.
Valid values:
-
hh is an hour of the day from 1 through 23.
-
mm is minutes from 00 through 59.
ON day_of_week
The day of the week to age the file. Valid values are SUNDAY through SATURDAY. They are not case-sensitive.
Examples
Below are examples of the use of SQLFORMATDISARDROLLOVER.
Example 1
This example closes the existing SQL discard file and creates a new one at 5:30 a.m. each day.
SQLFORMATDISCARDROLLOVER AT 05:30
Example 2
This example rolls the SQL discard file over every Friday at midnight.
SQLFORMATDISCARDROLLOVER ON friday
Example 3
This example rolls the SQL discard file over at 5:30 a.m. every Friday.
SQLFORMATDISCARDROLLOVER AT 05:30 ON FRIDAY
Example 4
This example will roll over the SQL discard file at 5:30 a.m. every Wednesday and at 5:30 am every Friday.
SQLFORMATDISCARDROLLOVER AT 05:30 ON WEDNESDAY, AT 05:30 ON FRIDAY