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 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.
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 DISCARDFILE
parameter
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
.
This example closes the existing discard file and creates a new one at 5:30 a.m. each day.
DISCARDROLLOVER AT 05:30
This example rolls the discard file over every Friday at midnight.
DISCARDROLLOVER ON friday
This example rolls the discard file over at 5:30 a.m. every Friday.
DISCARDROLLOVER AT 05:30 ON FRIDAY
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