How to resolve a CA Datacom Return Code 13(017) error.

Document ID : KB000045287
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:
A rare and sporadic error encountered by certain base product applications that use CA Datacom/AD is a RC 13(017). This error can also be received by user applications running CA Datacom/DB.

This error indicates an internal error with a database index, and often reflects an out-of-sync condition for a record between the data and index. While this situation should never happen under normal operating conditions, any number of unusual sets of circumstances could lead to this error.

One common situation is that the database area and index are restored from non-CA Datacom backups, and these backups were taken while the database was open and being updated. Since the non-Datacom utility may not be aware of records in buffers, what is backed up may not have complete integrity, and when restored, it is possible for an index record to exist without a data record, or vice-versa, leading to a RC 13(017) when that record is read.

Instructions: 

To resolve this error, the database must be closed in the MUF, which means that any application that uses this database must be stopped or shut down. Then, DBUTLTY INIT and RETIX functions must be processed against the database to initialize and rebuild the index.

Here is a basic sample job that will rebuild the index using the current index database file.

//DBRETIX JOB ...
//*
//********************************************************************
//*                                                                  *
//*  SAMPLE RETIX OF A CA DATACOM DATABASE INDEX                     *
//*                                                                  *
//*  THIS JOB PERFORMS A DBUTLTY RETIX TO REBUILD THE INDEX FOR A    *
//*  CA DATACOM DATABASE. IT WILL PROCESS THE INDEX FILE AS IT IS    *
//*  CURRENTLY ALLOCATED AND DEFINED.                                *
//*                                                                  *
//*  THIS JOB REQUIRES EXCLUSIVE ACCESS TO THE DATABASE FILES.       *
//*  APPLICATIONS USING THE DB MUST BE DOWN OR SUSPENDED BEFORE      *
//*  RUNNING THIS JOB, OR IT WILL FAIL.                              *
//*                                                                  *
//*  THIS JOB WILL:                                                  *
//*     1. TURN OFF ACCESS BY OTHERS TO THE DATABASE.                *
//*     2. CLOSE THE DATABASE IN THE MUF.                            *
//*     3. INITIALIZE THE EXISTING INDEX.                            *
//*     4. RECREATE THE INDEX FROM THE EXISTING DATA FILES.          *
//*     5. PRODUCE A REPORT OF THE DATABASE.                         *
//*     6. ALLOW ACCESS AGAIN TO THE DATABASE.                       *
//*                                                                  *
//********************************************************************
//*
//   SET CUS=YOUR DATACOM CUSLIB
//   SET CAI=YOUR DATACOM CAAXLOAD or CABDLOAD
//   SET CXX=YOUR CXX FILE NAME
//*
//*       REBUILD INDEX, PRODUCE REPORT AND RESTORE DATABASE ACCESS
//*
//RETIX    EXEC PGM=DBUTLTY,REGION=4M
//STEPLIB  DD  DISP=SHR,DSN=&CUS
//         DD  DISP=SHR,DSN=&CAI
//CXX      DD  DISP=SHR,DSN=&CXX
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
 ACCESS DBID=###,STATUS=OFF,USERS=FAIL
 COMM   DBID=###,OPTION=CLOSE
 INIT   DBID=###,AREA=IXX
 RETIX  DBID=###,OPTIMIZE=YES,SORT=999999999,OPTION1='(I)'
 COMM   DBID=###,OPTION=STATS
 REPORT DBID=###,AREA=CXX,TYPE=A
 ACCESS DBID=###,STATUS=WRITE
/*
//

Additional Information:

For more information about the INIT and RETIX functions, please refer to the following Guides:

CA Datacom/DB Version 15.0 DBUTLTY Reference Guide 

CA Datacom/DB Version 14.02 DBUTLTY Reference Guide 

As always, please contact CA Technologies support for CA Datacom if you have further questions.

***