Example 1
ON DATASET=BKP*
DO RETENTION=CYCLES 0010 PREFIX Y
If another version of any of these files is created, they will have exceeded their retention period (ten cycles) and the oldest version is scratched.
Example 2
ON DATASET=BKP*
DO RETENTION CYCLES 0010 PREFIX N
If another version of any of these files is created, their individual counts will not have exceeded their retention period (ten cycles). Therefore, all the versions of the files are retained.
Example 3
Save (retain) backup volumes or data sets for one year (365 days).
Figure 158 DO RETENTION Parameter Example 3
RULE: BKPSAVE LIB CTT.PROD.RULES TABLE: BKP0002
COMMAND ===> SCROLL===> CRSR
-------------------------------------------------------------------------------
RULE NAME BKPSAVE GROUP PRODUCTION MODE PROD (Prod/Test)
OWNER M43A SEQUENCE PRIORITY 03 CONTINUE SEARCH Y (Y/N)
DESCRIPTION SETS RETENTION AND ABEND-RETENTION PERIODS FOR BACKUP FILES
DESCRIPTION
DOCMEM CTTDOCS DOCLIB CTT.PROD.DOCS
============================================================================
DOC
============================================================================
ON DATASET = BKP* And/Or/Not A
ON PGM = BKP* And/Or/Not A
ON USERID = ADMIN And/Or/Not
============================================================================
DO RETENTION = DAYS 00365 And/Or
DO ABENDRET = DAYS 0010 And/Or
DO
============================================================================
============================================================================
DAYS ALL DCAL
AND/OR
WDAYS WCAL
FILL IN RULE DEFINITION. CMDS: EDIT, SHPF, DOC, SCHED, DOOPT, ONOPT 15.49.41
Example 4
Save (retain) backup volumes or data sets as long as all of the following conditions are true:
If any of these conditions are not true, the volume or data set is expired. In this example, if 5 days have passed since the data set was last accessed, or if the expiration date specified in the JCL EXPDT field has passed, the data set is expired.
Figure 159 DO RETENTION Parameter – Example 4
RULE: BKPSAVE LIB CTT.PROD.RULES TABLE: BKP0002
COMMAND ===> SCROLL===> CRSR
-------------------------------------------------------------------------------
RULE NAME BKPSAVE GROUP PRODUCTION MODE PROD (Prod/Test)
OWNER M43A SEQUENCE PRIORITY 03 CONTINUE SEARCH Y (Y/N)
DESCRIPTION SETS RETENTION AND ABEND-RETENTION PERIODS FOR BACKUP FILES
DESCRIPTION
DOCMEM CTTDOCS DOCLIB CTT.PROD.DOCS
============================================================================
DOC
============================================================================
ON DATASET = BKP* And/Or/Not A
ON PGM = BKP* And/Or/Not A
ON USERID = ADMIN And/Or/Not
============================================================================
DO RETENTION = LAST ACCESS 0004 And/Or A
CYCLES 0006 PREFIX Y (Y/N) And/Or A
JCL EXPDT
DO ABENDRET = CYCLES 0001 PREFIX Y (Y/N) And/Or
DO
============================================================================
============================================================================
DAYS ALL DCAL
FILL IN RULE DEFINITION. CMDS: EDIT, SHPF, DOC, SCHED, DOOPT, ONOPT 15.49.41
Parent Topic |