Repository data sets

When a process is not running under the control of the CICS® business transaction services domain, its state and the states of its constituent activities are preserved by being written to a VSAM data set known as a repository.

The states of all processes of a particular process-type (and of their activity instances) are stored on the same repository data set. Records for multiple process-types can be written to the same repository. You specify the repository on which processes of a particular process-type are stored when you define the process-type - see CEDA DEFINE PROCESSTYPE.

You must define at least one BTS repository data set to MVS. You might decide to define more than one, assigning a different set of process-types to each. One reason for defining more than one BTS repository might be storage efficiency - perhaps some of your process-types tend to produce longer records than others. To enable you to distinguish between process-types during a browse, you do not need to assign each process-type to a separate repository.

If you operate BTS in a sysplex, several CICS regions might share access to one or more repository data sets. This enables requests for the processes and activities stored on the data sets to be routed across the participating regions - see Administering BTS.

You must define the repository file as recoverable. Specify the following parameters to IDCAMS:

INDEXED
BTS repository data sets must be in KSDS format.
KEYS(50 0)
The file key. The file key is 50 bytes in length and is located at offset X'0' in the record.
LOG(UNDO|ALL)
The recovery options for the data set:
UNDO
The data set is recoverable.
ALL
Forward recovery is required. If you specify LOG(ALL), you must also specify a log stream on the LOGSTREAMID parameter.
LOGSTREAMID(log_stream_ID)
The identifier of the log stream to which forward recovery records are to be written. This parameter is required only if you specify LOG(ALL).
RECORDSIZE(average  maximum)
The average and maximum size of records on the data set, in bytes.

Specify maximum as 16384 bytes. CICS automatically splits any records that are larger than 16 KB.

It is difficult to predict the average size of repository records. (A notional record of 20000 bytes, for example, is split into one record of 16384 bytes and one of 3616 bytes.) Initially, specify average as 8 KB. If you find in practice that the average size of records is markedly different from this average, you can specify a different value.

SPANNED
A single record can span control intervals. Specify this parameter if the record size is larger than the CI.
Figure 1 shows example JCL for defining a BTS repository data set. This JCL is for illustration only.
Figure 1. Example JCL for defining a BTS repository data set
//SMITHGOT JOB (WINVMC,SMITH),CLASS=E,USER=username
//IJMRBTS EXEC PGM=IDCAMS,REGION=6144K
//SYSPRINT DD SYSOUT=A
//AMSDUMP  DD SYSOUT=A
//SYSIN    DD *
  DELETE ('CICSTS55.CICS.BTS') PURGE CLUSTER
  DEFINE CLUSTER (                         -
                NAME( CICSTS55.CICS.BTS )  -
                LOG(UNDO)                  -
                CYL(2,1)                   -
                CISZ(4096)                 -
                SPANNED                    -
                VOLUMES (P2DA62)           -
                KEYS( 50 0 )               -
                INDEXED                    -
                RECORDSIZE(8192  16384 )   -
                FREESPACE( 5 5 )           -
                SHAREOPTIONS( 2 3 )        -
                )                          -
  INDEX         (                          -
                NAME( CICSTS55.CICS.BTS.INDEX )   -
                )                          -
  DATA          (                          -
                NAME( CICSTS55.CICS.BTS.DATA )    -
                )
/*
//

To ensure that your repositories are continuously available, you are recommended to define them to use the backup while open (BWO) facility provided by DFSMSdss and DFSMShsm. For details of BWO, and how to define VSAM data sets to use it, see Defining backup while open (BWO) for VSAM files.