Rebuild Utility

When a database file has become corrupt and cannot be recovered by any other means, you must rebuild it. This situation is rare, but can occur if, for example, the file was open during a system crash.

To rebuild a corrupted database, use the Rebuild utility. You can execute Rebuild from the command line or from JCL. For complete documentation on using the Rebuild utility from the command line, see Rebuild.

To execute the Rebuild utility from JCL submission using MFDBUJCL:

Note:
  • If a database file requires a rebuild, then you should consider whether any associated index files should be rebuilt as well.
  • Make sure that there is enough free space on disk before submitting the rebuild job.

    You will need as much space as the file to be rebuilt requires, and if you have specified an OUTPUT file to be created in the same directory, then you need to account for the extra space requirement.

To invoke Rebuild from JCL, include the following step:
//STEP01  EXEC PGM=MFDBUJCL,PARM='REBUILD'
//SYSOUT  DD SYSOUT=*
//SYSIN   DD *
OUT-PATH=DBPath
DB1
DB2
...
DBn
/*     
//
where DBPath is the directory where the corrupted database files reside, and DB1, DB2, and DBn represent the names of each database to be rebuilt; however, the number of databases to rebuild is not limited. For example:
//STEP01  EXEC PGM=MFDBUJCL,PARM='REBUILD'
//SYSOUT  DD SYSOUT=*
//SYSIN   DD *
OUT-PATH=C:\IMS\BACKUP\DATABASES
BNKCUST 
BNKACC
BNKATYPE
/*     
//