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 AT
with a time but without a day creates a new discard file at the specified time every day.
Entering AT
without a time generates an error.
Entering ON
with a day but without a time creates a new discard file at midnight on the specified day.
Entering ON
without 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 }
Examples
Below are examples of the use of SQLFORMATDISARDROLLOVER
.
This example closes the existing SQL discard file and creates a new one at 5:30 a.m. each day.
SQLFORMATDISCARDROLLOVER AT 05:30
This example rolls the SQL discard file over every Friday at midnight.
SQLFORMATDISCARDROLLOVER ON friday
This example rolls the SQL discard file over at 5:30 a.m. every Friday.
SQLFORMATDISCARDROLLOVER AT 05:30 ON FRIDAY
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