Understanding the database creation jobs

Three jobs are supplied in SAMPLIB to assist you in defining the databases to DB2 that are required in your installation (CBRISQL0, CBRISQLX, and CBRISQLY). Three jobs are supplied in SAMPLIB to assist in allocating the VSAM data sets needed for each of the object storage databases you require (CBRIALC0, CBRIALCX, CBRIALCY).

The job CBRILOB is provided in SAMPLIB to create the LOB Storage Structure, which is required if LOB support is to be enabled. You must modify CBRILOB to include the desired LOB enabled storage groups. This job is only required for storage groups that are to be LOB enabled.

SAMPLIB member CBRISQL0 job allocates and defines the object storage databases. SAMPLIB member CBRIALC0 allocates the data sets needed for each object storage database. There is no minimum number of databases or views that must be created. Additionally, there is no maximum limit to the number of object storage databases you might have in your installation. These jobs can be run multiple times to define as many object storage groups and data sets as are required to suite your environment.

SAMPLIB members CBRIALCX, CBRIALCY, CBRISQLX, and CBRISQLY allocate the data sets and define the databases required for object administration. These four SAMPLIB jobs must be modified and executed successfully before OSR or OSMC can be used. SAMPLIB members CBRIALCX and CBRIALCY must be run before SAMPLIB members CBRISQLX and CBRISQLY.

Each step number in all the SAMPLIB jobs is unique. Within the jobs that allocate and define the object storage databases, each step number corresponds to the database name qualifier for the data sets being allocated, and to the database name being defined to DB2.

Related reading: For more information on the SAMPLIB jobs, see these topics:

For you to use an OAM object storage database, the allocate job step must be executed, followed by the related DB2 database definition job step. Modify to include the required storage groups and then run the CBRIALCX, CBRIALCY and CBRISQLX, CBRISQLY jobs and the database definition job steps (CBRISQL0) that correspond to the allocation job steps previously run (CBRIALC0). For more information, see step  6d .

 6a Add additional steps to the Database Creation Jobs.

You must perform this step at initial installation. For migration, you must verify or perform this step if you determine that it has not yet been completed in your current environment.

After you have identified the databases needed in your installation, locate the SAMPLIB jobs that contain the steps that will allocate the data sets and define the databases. Add steps for each storage group as needed within the jobs. The remaining jobs and steps must be modified before they are executed.

 6b Modify the OAM Data Set Allocation Jobs.

You must perform this step at initial installation. For migration, you must verify or perform this step if you determine that it has not yet been completed in your current environment.

All allocation jobs must be modified as follows:

  1. Change the JOB statement to meet your installation’s requirements.

    _______________________________________________________

  2. Change cat_name to the DB2 catalog name used in your installation.

    _______________________________________________________

Modify individual allocation job steps as follows:

  1. Change vol_ser to the volume serial numbers of the volumes where the data sets will reside.

    _______________________________________________________

  2. Change pri_alloc sec_alloc to the number of cylinders (or tracks) needed for the initial size and the secondary extent size for the data set. The entire statement can be changed to TRACKS(pri_alloc sec_alloc) if the data set is not expected to be large. This space allocation must be individually determined for each data set needed by the database. See Estimating resource requirements for information about database space allocation calculations.

    _______________________________________________________

  3. Add allocations for each object storage group defined in your installation.

    _______________________________________________________

The allocation job CBRIALCX and CBRIALCY must be modified as above. See, CBRIALCX, and CBRIALCY for more information.

If you choose to have SMS manage your DB2 VSAM data sets, create an ACS routine for the VSAM DB2 allocations. Enable the storage group, enable the volumes, then validate and activate the SCDS.

 6c Run the OAM Data Set Allocation Jobs.

You must perform this step at initial installation. For migration, you must verify or perform this step if you determine that it has not yet been completed in your current environment.

After the allocation jobs have been modified, they must be run to successful completion before proceeding. If an error occurs within a particular step, correct the error and rerun either the entire job or just the failing job step.

Start of changeRun CBRIALC0 for as many groups as needed; then, run CBRIALCX and CBRIALCY. (Because the delete/define refers to specific volume serials, the storage class must be defined with the Guaranteed Space = Y attribute.) For more information on these SAMPLIB jobs, see CBRIALC0, CBRIALCX, and CBRIALCY.End of change

 6d Modify the OAM Database Definition Jobs.

You must perform this step at initial installation. For migration, you must verify or perform this step if you determine that it has not yet been completed in your current environment.

After the data sets have been allocated, run the jobs and steps that define the databases to DB2. The jobs and steps related to data set allocation must be modified before they are executed. Sample jobs are shown in Sample library members and reside in SAMPLIB.

For all database definition jobs for the object storage databases, change the JOB statement to meet your installation’s requirements.

Modify all database definition job steps as follows:

  1. Change "DB2" in the statement DSN SYSTEM(DB2) to the subsystem ID for DB2 in your installation.

    _______________________________________________________

  2. Change the data set name in the statement LIB('DB2.RUNLIB.LOAD') to the data set name used for the DB2.RUNLIB.LOAD data set in your installation.

    _______________________________________________________

  3. Change cat_name to the DB2 catalog name used in your installation. This must be the same name that was used as the cat_name in the allocation job.

    _______________________________________________________

  4. Change the auth_id to the IDs authorized to the respective group.

    _______________________________________________________

  5. Change the PLAN name on the RUN statement to match your current DB2 version and release level.

    _______________________________________________________

The database definition jobs CBRISQLX and CBRISQLY must be modified as previously described in the data set allocations job CBRIALCX and CBRIALCY. For OSR or OSMC to run, the CBRISQLX and CBRISQLY jobs must complete successfully.

Related reading: For more information on these SAMPLIB jobs, see CBRISQLX, CBRISQLY, CBRIALCX, and CBRIALCY.

 6e Run the OAM Database Definition Jobs.

You must perform this step at initial installation. For migration, you must verify or perform this step if you determine that it has not yet been completed in your current environment.

Note: Before z/OS V1R7, the CBRISQL0 sample job created UNIQUE indexes OBJDIRX1 and OBJDIRX2. In z/OS V1R7, CBRISQL0 was modified to create these indexes without the UNIQUE attribute to alleviate a potential OAM OSREQ error due to duplicate time stamp (RC8 RSN30020100). If your OAM Database was defined before z/OS V1R7, it is recommended that you drop UNIQUE indexes OBJDIRX1 and OBJDIRX2, and create them as non-UNIQUE per sample job CBRISQL0. See APAR II13964 for more information.

The DB2 subsystem must be active before starting any of the database definition jobs. All object storage database definition job steps and the object administration database definition job must complete successfully.

Run job CBRISQL0 as many times as needed for the groups used in your installation. Then run jobs CBRISQLX and CBRISQLY.

Related reading: For more information on these SAMPLIB jobs, see CBRISQLX see CBRISQL0, CBRISQLY, and CBRISQLY.

 6f Modify OAM LOB data set allocation and definition jobs.

Perform this step only if you intend to enable LOB support.

Modify all database definition job steps as follows:

  1. Change vol_ser to the volume serials that your target database should reside on.

    _______________________________________________________

  2. Change pri_alloc and sec_alloc to the desired number of cylinders for each particular VSAM ESDS being defined. For example, CYLINDER(pri_alloc sec_alloc) may be CYLINDER(200 10).

    _______________________________________________________

  3. Change cat_name to the name of the catalog you want to use under DB2.

    _______________________________________________________

  4. Include the REUSE keyword in the DEFINE CLUSTER command for each data base, if you intend to use the DSN1COPY utility to copy these data bases.

    _______________________________________________________

  5. Change osg_hlq to the high level qualifier to be used for the object storage group definition and tables. This is the qualifier used on the object storage group define through ISMF and used by OAM and OSR for all access to the object storage group's directories and data tables.

    _______________________________________________________

  6. Change ds_size to the maximum size allowed for each data set. Refer to the description of the CREATE TABLESPACE statement DSSIZE parameter in the IBM Information Management Software for z/OS Solutions Information Center for limitations.

    _______________________________________________________

  7. Change auth_id to the identifiers authorized for the respective group.

    _______________________________________________________

  8. Change the name in the DSN SYSTEM(DB2) statement to the name of the DB2 Subsystem in your installation.

    _______________________________________________________

  9. Change the data set name in the RUN statement LIB('DB2.RUNLIB.LOAD') phrase to the data set name used in your installation for the DB2 RUNLIB.LOAD data set.

    _______________________________________________________

  10. Change the PLAN name (DSNTIA71) in the RUN statement to match your current DB2 version and release level.

    _______________________________________________________

  11. Add additional job steps, repeating all statements in the STEP00 and STEP01, for each object storage group defined in your configuration. In each repeated step, change the qualifier to match the qualifier for each object storage group.

    _______________________________________________________

Related reading: For more information on this SAMPLIB job, see CBRILOB.

 6g Run OAM LOB data set allocation and definition jobs.

Perform this step only if you intend to enable LOB support.

If you have run this job and want to start over again, issue a DROP for each LOB base table and for each base tablespace and auxiliary tablespace that was previously defined in DB2 by this job.

Related reading: For more information on this SAMPLIB job, see CBRILOB.