Creating a change accumulation group


To create a change accumulation group, specify the following items:

  • Group name
  • Target objects
  • File templates

Each time you run a R+/CHANGE ACCUM  batch job for a particular group, R+/CHANGE ACCUM  generates a change accumulation file set.

The following figure shows the components of a change accumulation group:

GUID-82EF076F-39AD-4A39-BACB-4E03B1EB76DA-low.png

Naming a change accumulation group

The name of a change accumulation group consists of 1 to 18 alphanumeric, national, or special ($, @, -, _, #) characters.

Specifying target object definitions

The following rules apply when specifying target objects:

  • You can include a target object in more than one group.
  • You can include any number of target objects in a group as long as a sufficient amount of REGION is specified on the EXEC statement when you run the batch utility.
  • A group can include certain combinations of table spaces, partitions, and data sets.
  • You cannot define indexes to a group through the repository. To accumulate index log records, specify the INDEXES YES option on the ACCUM statement.
  • You cannot define cloned objects through the repository. To accumulate log records for clones, specify the CLONE option.
  • The repository and the target objects that you select for a change accumulation group must reside on the same target Db2 subsystem.

Using wildcards

You can specify multiple databases and table spaces by using the ?, *, or % wildcard characters.

The ? character represents any single character that occurs in the designated position. The % or * characters represent zero or more characters in that position.

Specifying partitions or data sets

To specify a particular partition or data set for the change accumulation group, you must specify the DSNUM option.

For more information, see DSNUM. If the table space is partitioned, DSNUM cannot be greater than the number of partitions. If the table space is nonpartitioned table space, DSNUM cannot be greater than 32.

You can specify a range of DSNUMs.

To use all of the partitions for a partitioned table space, specify LODSNUM=0 and HIDSNUM=0.

The INDEXES YES option is available only when you specify ACCUM and the group includes all partitions.

Specifying file templates

The file templates determine how many copies of change accumulation files are generated for a group.

The following file templates are available:

  • LOCAL PRIMARY
  • LOCAL BACKUP
  • REMOTE PRIMARY
  • REMOTE BACKUP

The data set name pattern that you specify for each copy in the file set can be a maximum of 60 characters. You can specify data set names as a generation data group (GDG), or you can use symbolic variables.

Before creating the file set and reading log records, R+/CHANGE ACCUM checks the MVS catalog to ensure that the files do not already exist. If R+/CHANGE ACCUM finds any discrepancies, R+/CHANGE ACCUM issues an error message, and stops executing.

Using GDGs

To specify a GDG as the data set name, include (+1) at the end of the model for the data set name.

If you use a GDG, specify a different data set name model for each copy of the change accumulation file within the same change accumulation group. Each time you run R+/CHANGE ACCUM for the group, R+/CHANGE ACCUM increments by one the data set names for the change accumulation files.

Using symbolic variables

You can use symbolic variables to specify data set name patterns for the file set.

For more information, see the following table.

You must follow a symbolic variable with a period, ampersand (&), or any special character that is not alphanumeric and not $, @, or #. Further guidelines are as follows:

  • Using a period terminates the symbolic variable. The generated data set name does not include the period.
  • An ampersand indicates the beginning of another symbolic variable. The generated data set name does not include the ampersand.
  • Trailing blanks are not included in any values for symbolic variables when R+/CHANGE ACCUM generates a change accumulation file name.

Important

GDG names do not use symbolic variables.

Symbolic variables used in data set names

Symbol

Result

&CAFILE

A counter from one to four digits of change accumulation file sets that were created for a change accumulation group

If duplicate copies are created (for example, LP and LB), R+/CHANGE ACCUM uses the same number for each copy.

&CAGROUP

&GROUP

Name of the change accumulation group

If the name exceeds eight characters, R+/CHANGE ACCUM uses only the first eight characters. If the group name contains characters that are not allowed in a data set name, R+/CHANGE ACCUM eliminates these characters.

&DATE

date of the R+/CHANGE ACCUM job run (in the form YYMMDD)

&DAY

Current day (in the form DD)

&DB

Database containing the space being copied

&DSNUM, &PART

Data set or partition being copied

  • 2 bytes for 0 - 99
  • 3 bytes for 100 - 999
  • 4 bytes for 1000 - 4096

&HOUR

Current hour (in the form HH)

&ICTYPE

Type of image copy:

  • F for FULL YES
  • I for FULL NO
  • A for FULL AUTO or CHANGELIMIT
  • D for FULL DSN1COPY

&INST

Instance number, with valid values of 1 or 2

&JDATE

Current Julian date (in the form YYDDD)

&JDAY

Current Julian day (in the form DDD)

&JOBNAME

&JOB

Job name that is used in the R+/CHANGE ACCUM job

&LDSNUM, &LPART

Data set or partition being copied

  • 3 bytes for 000-999
  • 4 bytes for 1000-4096

&MINUTE

Current minute (in the form MM)

&MONTH

Current month (in the form MM)

&SECOND

Current second (in the form SS)

&SEQ

A sequential number that restarts at 1 at the beginning of each job step execution

&SP

Space name of the table or index being copied

&STEPNAME

&STEP

Step name that is used in the R+/CHANGE ACCUM job

&SSID

DB2 subsystem ID that identifies where the repository resides

&TIME

Time of the R+/CHANGE ACCUM job run (in the form HHMMSS)

&TS

Table space or index space is copied

&TYPE

Type of output file that is created:

  • LP for the local site primary copy
  • LB for the local site backup copy
  • RP for the remote site primary copy
  • RB for the remote site backup copy

&UTILID

&UTIL

Name of the R+/CHANGE ACCUM utility ID

If the name exceeds eight characters, R+/CHANGE ACCUM uses only the first eight characters.

&USERID

&UID

The user ID that is assigned to the R+/CHANGE ACCUM job

&YEAR

Current year (in the form YY)

In the following examples, the subsystem ID is DB2Y. In the first example, notice that &SSID is followed by a period. TEST.&SSIDWX would not be valid because &SSID is not terminated with a period.

TEST.&SSID.WX generates TEST.DB2YWX

When &SSID is followed by two periods, the first period terminates the symbolic variable, and the second period becomes part of the generated name.

TEST.&SSID..WX.D&DATE generates TEST.DB2Y.WX.D110130

The next example shows that a combination of symbolic variables is valid if the combined values do not exceed eight characters. In this example, the subsystem ID is still DB2Y and the user ID is ABC.

     &SSID&USERID generates DB2YABC

Important

Be sure to precede numeric valued symbolic variables (for example, &DATE and &TIME) with a letter. Doing so avoids starting a node of a data set name with a number (as shown in the second example).

Limitations when used with BMC AMI Recover

The ACCUM command is not valid in the same SYSIN with the following BMC AMI Recover commands and options:

  • LOGSCAN command
  • OPTIONS SIMULATE YES option

    For the recovery simulation feature, the output of change accumulation files is not supported. (However, the use of change accumulation files as input to recovery simulation is supported.)

A recovery that uses the BACKOUT option does not use logs from the change accumulation files. A BACKOUT recovery uses only the regular Db2 logs.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*