IDMSDBAN shows many broken chains, how can these be fixed with IDMS DB Audit?
599702 - NEXT LINK NOT FOUND SET=set-name CHAIN START OF LINK 0/852050:117 OWNER IS AT 0/852050:117
CHAIN LENGTH 1 LINK POINTS TO 0/852050:110 PRIOR IN PFX 0/852050:110
599703 - PRIOR LINK NOT FOUND SET=set-name CHAIN START OF LINK 0/852050:117 OWNER IS AT 0/852050:117
CHAIN LENGTH 1 LINK POINTS TO 0/852050:110 PRIOR IN PFX 0/852050:110
599706 - NO OWNER IN THIS CHAIN SET=set-name CHAIN START OF LINK 0/852050:117 OWNER IS AT 0/852050:117
CHAIN LENGTH 1 LINK POINTS TO 0/852050:110 PRIOR IN PFX 0/852050:110
599703 - PRIOR LINK NOT FOUND SET=set-name CHAIN START OF LINK 0/852050:110 OWNER IS AT Null
CHAIN LENGTH 1 LINK POINTS TO 0/852050:117 PRIOR IN PFX 0/852050:117
599702 - NEXT LINK NOT FOUND SET=set-name CHAIN START OF LINK 0/852050:110 OWNER IS AT Null
CHAIN LENGTH 1 LINK POINTS TO 0/852050:117 PRIOR IN PFX 0/852050:117
Release : 19.0
In this case the problem is some owner pointers are null in one SET.
IDMS DB Audit can usually fix IDMSDBAN errors 599702, 599703, 599706, 599703 and 599702.
First, run a SIMULATE process to see if can fix the errors, then run an UPDATE process.
Use the following JCL to run the DB Audit simulate process, if errors are in multiple sets add additional SET statements below.
//* ******************************************************************
//* * DELETE FILES *
//* ******************************************************************
//*
//DELETE EXEC PGM=IDCAMS,REGION=0K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE hlq.DBAUDT.EXTRACT
DELETE hlq.DBAUDT.WORKFILE
DELETE hlq.DBAUDT.DBKYWORK
DELETE hlq.DBAUDT.INDXEXTR
DELETE hlq.DBAUDT.INDXWORK
SET MAXCC=0
//*
//* ******************************************************************
//* * ALLOCATE GENERAL AND INDEX FILES *
//* ******************************************************************
//*
//ALLOCATE EXEC PGM=IEFBR14
//EXTRACTS DD DSN=hlq.DBAUDIT.EXTRACT,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(10,2)),
// DCB=BLKSIZE=6144
//WORKFILE DD DSN=hlq.DBAUDIT.WORKFILE,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(20,4)),
// DCB=BLKSIZE=6144
//DBKYWORK DD DSN=hlq.DBAUDIT.DBKYWORK,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(5,2)),
// DCB=BLKSIZE=6000
//INDXEXTR DD DSN=hlq.DBAUDIT.INDXEXTR,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(5,2)),
// DCB=BLKSIZE=6144
//INDXWORK DD DSN=hlq.DBAUDIT.INDXWORK,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(20,4)),
// DCB=BLKSIZE=6144
//*
//* THIS JCL IS FOR AUDIT AND SIMULATED FIXING
//*
//DBAUDIT EXEC PGM=USADRVR,REGION=0M
//STEPLIB DD DSN=idms.dba.loadlib,DISP=SHR
// DD DSN=idms.loadlib,DISP=SHR
//SORTLIB DD DSN=sort.loadlib,DISP=SHR
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,1)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,1)
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,1)
//SORTWK04 DD UNIT=SYSDA,SPACE=(CYL,1)
//*
//*
//*GENERAL FILES NEEDED FOR ALL RUNS.
//*
//EXTRACTS DD DSN=hlq.DBAUDIT.EXTRACT,DISP=OLD
//WORKFILE DD DSN=hlq.DBAUDIT.WORKFILE,DISP=OLD
//*
//SORTMSG DD SYSOUT=*
//SYSLST DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SNAPIT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//*FILES NEEDED FOR AUDITING OR FIXING
//*INTEGRATED INDEX SETS.
//*
//DBKYWORK DD DSN=hlq.DBAUDIT.DBKYWORK,DISP=OLD
//INDXEXTR DD DSN=hlq.DBAUDIT.INDXEXTR,DISP=OLD
//INDXWORK DD DSN=hlq.DBAUDIT.INDXWORK,DISP=OLD
//*
//* INPUT STATEMENTS
//*
//SYSIPT DD *
PROCESS,SUBSCHEMA=ss_name,
READYMODE=RETRIEVAL,SORTMSG=CRITICAL,STARTWITH=NONE,
AUDITTYPE=STANDARD
AUDIT,USERSETS,
CORE,SETLIMIT=300000,DBKEYTBL,STOPAFTER=999999
SET=set_name,AUDIT
FIX=SIMULATE,USERSETS
REPORTS=YES,RECDATA=HEX,SETMBRS=ERRSONLY
/*
//SYSIDMS DD *
DMCL=dmcl_name
DBNAME=dbname
LOCAL=ON
USERCAT=OFF
/*
//
Check for these messages indicating DB Audit can fix the errors:
FIXS016I INITIATING FIX PHASE 01/09/23 06:23:57
FIXS017I END FIX PHASE, RC=00 01/09/23 06:23:59
DRVR022I AUDIT/FIX PHASE STATISTICS . . .
USER SETS IN ERROR------------------2,205
USER SETS FIXED---------------------2,205
To perform the actual fix change the READYMODE and FIX parameters in the PROCESS statement to UPDATE.
Run the same JCL with the following input:
//SYSIPT DD *
PROCESS,SUBSCHEMA=ss_name,
READYMODE=UPDATE,SORTMSG=CRITICAL,STARTWITH=NONE,
AUDITTYPE=STANDARD
AUDIT,USERSETS,
CORE,SETLIMIT=300000,DBKEYTBL,STOPAFTER=999999
SET=set_name,AUDIT
FIX=UPDATE,USERSETS
REPORTS=YES,RECDATA=HEX,SETMBRS=ERRSONLY
/*
Check for these messages for successful completion:
FIXS016I INITIATING FIX PHASE 01/09/23 07:41:11
FIXS049I INITIATING ACTUAL FIXING OF SETS 01/09/23 07:41:12
FIXS055I DATABASE SUCCESSFULLY UPDATED
FIXS017I END FIX PHASE, RC=00 01/09/23 07:41:14
..
DRVR022I AUDIT/FIX PHASE STATISTICS . . .
USER SETS IN ERROR------------------2,205
USER SETS FIXED---------------------2,205
See IDMS documentation section IDMS/DB Audit