Reducing the size of a database

Overview procedure

Reducing the size of an Adabas Audit Data Retrieval database involves the following:

  1. Unloading the data from the existing database to a flatfile
  2. Saving the existing database under a new name
  3. Creating a new, smaller database under the original name
  4. Formatting the new database
  5. Restoring data from the flatfile to the new database

Job B97DBRED

These actions are performed by job B97DBRED:

  1. Step UNLOAD uses BST05DBL to unload the data from the existing VSAM database to a flatfile.
  2. Step DBREN uses IDCAMS to rename the VSAM database.
  3. Step DBDEF uses IDCAMS to define a new, smaller VSAM database.
  4. Step DBFORM uses BST05FOR to format the new VSAM database.
  5. Step DBLOAD uses BST05DBL to restore data from the flatfile to the new VSAM database.

Job B97DBRED is tailored at the time of installation and placed in the BETA97.CNTL.

Caution: No database access when making the database smaller

Do not access the Adabas Audit Data Retrieval database while making the Adabas Audit Data Retrieval database smaller is in progress. To prevent the database from being accessed:

  1. Stop all Adabas Audit Data Retrieval jobs and the reader started tasks that are running.
  2. Then stop the Adabas Audit Data Retrieval started task.

Required JCL modifications

The job B97DBRED is tailored for the database file B97MAIN (not mirrored).

When reducing the size of other databases, modify the names in each step as described below.

When working with a mirrored database, you must reduce the size of both the original and the mirror database.

Required modifications in JCL for step UNLOAD

Check and if necessary modify the size and the name of the flatfile in DD BQLSAVE and the logical filename of the database to unload in DD BQLIN.

Required modifications in JCL for step DBREN

Check and if necessary modify the old name and the new name for DATA and KEY component in DD SYSIN.

Required modifications in JCL for step DBDEF

Check and if necessary modify the name for DATA and KEY component in DD SYSIN. You must use the original name for the new, smaller database.

Enter the new space requirement in cylinders for the data and key file. For more information on space requirements, see the table in "Adabas Audit Data Retrieval database components".

Required modifications in JCL for step DBFORM

Check and if necessary modify the database name in DD BQLIN.

Required modifications in JCL for step DBLOAD

Check and if necessary modify the name of the flatfile in DD BQLIN.

Sample JCL

Job B97DBRED is tailored at the time of installation and placed in the BETA97.CNTL.

+----------------------------------------------------------------------+
|jobcard |
|//UNLOAD EXEC PGM=BST01RFF,REGION=0M, |
|// PARM=('S=97,B01LST=xx,B97LST=xx', |
|// 'PGM=BST05DBL,SIGNON=NO') |
|//* |
|//STEPLIB DD DISP=SHR, |
|// DSN=BSA.LOAD |
|// DD DISP=SHR, |
|// DSN=BETA97.LOAD |
|//* |
|//SFFPARM DD DISP=SHR, |
|// DSN=BETA.PARMLIB |
|//* |
|//B97DEF DD DISP=SHR, |
|// DSN=BETA97.DB.DEF |
|//* |
|//BQLSAVE DD DSN=BETA97.DB.UNLOADB, |
|//* UNIT=SMS, |
|//* VOL=SER=SMS, |
|// DISP=(,CATLG,DELETE), |
|// SPACE=(CYL,(20,20),RLSE), |
|// DCB=(RECFM=VB,LRECL=27990,BLKSIZE=27994) |
|//* |
|//BQLPRINT DD SYSOUT=* |
|//SYSPRINT DD SYSOUT=* |
|//* |
|//BQLIN DD * |
| UNLOAD FILE B97MAIN |
|//* |
|//IRMPRINT DD SYSOUT=* |
|//BQLPRINT DD SYSOUT=* |
|//SYSPRINT DD SYSOUT=* |
|//* |
|//SFFFDUMP DD SYSOUT=* |
|//SYSUDUMP DD SYSOUT=* |
|//SYSABEND DD SYSOUT=* |
|//* |

|//*-----------------------------------------------------------------* |
|//* RENAME THE OLD DATABASE - ENTER ANOTHER NEWNAME IF YOU WANT * |
|//*-----------------------------------------------------------------* |
|//DBREN EXEC PGM=IDCAMS,COND=(0,NE) |
|//* |
|//SYSPRINT DD SYSOUT=* |
|//SYSIN DD * |
| ALTER BETA97.DB.MAIN |
| NEWNAME(BETA97.DB.MAIN.OLD) |
| ALTER BETA97.DB.MAIN.DATA |
| NEWNAME(BETA97.DB.MAIN.OLD.DATA) |
| ALTER BETA97.DB.MAIN.KEY |
| NEWNAME(BETA97.DB.MAIN.KEY.OLD) |
| ALTER BETA97.DB.MAIN.KEY.DATA |
| NEWNAME(BETA97.DB.MAIN.KEY.OLD.DATA) |
|//* |
|//*-----------------------------------------------------------------* |
|//* DEFINE BETA97 DATABASE WITH LOWER SPACE VALUE(S) * |
|//*-----------------------------------------------------------------* |
|//DBDEF EXEC PGM=IDCAMS,COND=(0,NE) |
|//* |
|//SYSPRINT DD SYSOUT=* |
|//SYSIN DD * |
| DEFINE CLUSTER( - |
| NAME(BETA97.DB.MAIN) - |
| CYLINDERS(???) - |
| SHAREOPTIONS(3 3) - |
| OWNER(B97) - |
| UNIQUE - |
| NONINDEXED - |
| ) - |
| DATA( - |
| NAME(BETA97.DB.MAIN.DATA) - |
| CONTROLINTERVALSIZE(4096) - |
| RECORDSIZE(4088 4088) - |
| ) |
| DEFINE CLUSTER( - |
| NAME(BETA97.DB.MAIN.KEY) - |
| CYLINDERS(???) - |
| SHAREOPTIONS(3 3) - |
| OWNER(B97) - |
| UNIQUE - |
| NONINDEXED - |
| ) - |
| DATA( - |
| NAME(BETA97.DB.MAIN.KEY.DATA) - |
| CONTROLINTERVALSIZE(4096) - |
| RECORDSIZE(4088 4088) - |
| ) |
|//* |

|//*-----------------------------------------------------------------* |
|//* FORMAT DATABASE FILES * |
|//*-----------------------------------------------------------------* |
|//DBFORM EXEC PGM=BST01RFF,REGION=0M,COND=(0,NE), |
|// PARM=('S=97,B01LST=xx,B97LST=xx', |
|// 'PGM=BST05FOR,SIGNON=NO') |
|//* |
|//STEPLIB DD DISP=SHR, |
|// DSN=BSA.LOAD |
|// DD DISP=SHR, |
|// DSN=BETA97.LOAD |
|//* |
|//SFFPARM DD DISP=SHR, |
|// DSN=BETA.PARMLIB |
|//* |
|//B97DEF DD DISP=SHR, |
|// DSN=BETA97.DB.DEF |
|//* |
|//BQLIN DD * |
| FORMAT FILE DSNAME(BETA97.DB.MAIN.KEY) |
| FORMAT FILE DSNAME(BETA97.DB.MAIN) |
|//* |
|//IRMPRINT DD SYSOUT=* |
|//BQLPRINT DD SYSOUT=* |
|//SYSPRINT DD SYSOUT=* |
|//* |
|//SFFFDUMP DD SYSOUT=* |
|//SYSUDUMP DD SYSOUT=* |
|//SYSABEND DD SYSOUT=* |
|//* |
|//*-----------------------------------------------------------------* |
|//* UPLOAD BETA 97 DATABASE FILES * |
|//*-----------------------------------------------------------------* |
|//DBLOAD EXEC PGM=BST01RFF,REGION=0M,COND=(0,NE), |
|// PARM=('S=97,B01LST=xx,B97LST=xx', |
|// 'PGM=BST05DBL,SIGNON=NO') |
|//* |
|//STEPLIB DD DISP=SHR, |
|// DSN=BSA.LOAD |
|// DD DISP=SHR, |
|// DSN=BETA97.LOAD |
|//* |
|//SFFPARM DD DISP=SHR, |
|// DSN=BETA.PARMLIB |
|//* |
|//B97DEF DD DISP=SHR, |
|// DSN=BETA97.DB.DEF |
|//* |
|//BQLIN DD * |
| LOAD TABLE * DSNAME(BETA97.DB.UNLOADB) |
|//* |
|//IRMPRINT DD SYSOUT=* |
|//BQLPRINT DD SYSOUT=* |
|//SYSPRINT DD SYSOUT=* |
|//* |
|//SFFFDUMP DD SYSOUT=* |
|//SYSUDUMP DD SYSOUT=* |
|//SYSABEND DD SYSOUT=* |
+----------------------------------------------------------------------+