DISCARDROLLOVER
Valid for
Extract, Replicat
Description
Use DISCARDROLLOVER to specify when a 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 Extract or Replicat group and (n) is a number that gets incremented by one each time a new file is created, for example: $DATA.GGSDISC.DISCARD0, $DATA.GGSDISC.DISCARD1, $DATA.GGSDISC.DISCARD2, 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.
A discard file will not roll over if:
-
The discard file is empty
-
The discard file was created by default rather than declared using the
DISCARDFILEparameter
Default
Disabled. No rules specified.
Syntax
DISCARDROLLOVER {
AT hh:mm |
ON day_of_week |
AT hh_mm ON day_of_week
}
Examples
Below are examples of the use of DISARDROLLOVER.
- Example 1
-
This example closes the existing discard file and creates a new one at 5:30 a.m. each day.
DISCARDROLLOVER AT 05:30
- Example 2
-
This example rolls the discard file over every Friday at midnight.
DISCARDROLLOVER ON friday
- Example 3
-
This example rolls the discard file over at 5:30 a.m. every Friday.
DISCARDROLLOVER AT 05:30 ON FRIDAY
- Example 4
-
This example will roll over the discard file at 5:30 a.m. every Wednesday and at 5:30 am every Friday.
DISCARDROLLOVER AT 05:30 ON WEDNESDAY, AT 05:30 ON FRIDAY