Why do I get RC 02(052) on deleted tables in my RETIX?

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

Para la versión en español, consulte TEC1593534.

When making changes to the structure of a database, part of the process involves updating the database catalog (called the CXX) with the new definitions. The CXX is used by many utilities - e.g. BACKUP, EXTRACT, RETIX, REPORT, and others - to serially process all the tables and areas within a particular database.

Tables are occasionally deleted from a database, and even when the new database definition is cataloged, these deleted tables are kept in the CXX to allow backup processing against these tables if needed.

Question:

When running a RETIX to rebuild a database index after changing the database, why do I receive a RC 02(052) on tables that have been deleted?

Answer:

If you look at a CXX report for the database being processed, you might see a listing like this for the tables/areas that have been deleted (lines have been shortened to fit here):

Base:   333         ************************************************ Directory: MYMUFCXX
TABLE NAME - ABC                        AREA NAME  - ABC                      *HISTORY*
OCCURRENCE - TABLE-ABC      P006        OCCURRENCE - AREA-ABC               P006
TABLE ID   -     45                     AREA SQLNAME -
RECORD LENGTH    -    164 /    176      BLOCK LENGTH      -       4,096     SLACK -    0

If you look to the far right, you will see *HISTORY* on the line with the table/area name. This means that theses tables were deleted from the latest catalog of this database, and the History version is kept here in case you need to run BACKUP or EXTRACT against those tables.

If you have completed processing or do not need to further reference these deleted tables, you should remove them from the CXX. This is done by running a DBUTLTY job with the CXXMAINT function - one for each table you want to delete from the CXX. Your input might look like the sample below, which has an optional CXX report before and after so that you can see the change.

//SYSIN     DD  *
 REPORT   DBID=333,AREA=CXX
 CXXMAINT DBID=333,OPTION=DELETE,TABLE=ABC
 CXXMAINT DBID=333,OPTION=DELETE,TABLE=DEF
 REPORT   DBID=333,AREA=CXX
/*

Once these entries have been removed from the CXX, you should be able to run your RETIX or other database commands successfully. If you previously ran a DBUTLTY function that failed, you may need to add a RESET DBID=###,AREA=CXX function at the beginning of this input to prevent an RC 46 error. 

Additional Information:

For more information about deleting tables or databases, please refer to the following DocOps webpages.

For CA Datacom/DB version 15.1, see Administrating / CA Datacom/DB Database and System Administration / Creating and Maintaining the Directory (CXX) / Deleting Databases.

For CA Datacom/DB version 15.0, see Administrating CA Datacom/DB Database and System Administration / Creating and Maintaining the Directory (CXX) / Deleting Databases.

For more information about the CXXMAINT DELETE function, please refer to the following DocOps webpages.

For CA Datacom/DB version 15.1, see Reference / DBUTLTY Reference / Utility Function Summary / CXXMAINT (Maintain Directory) / CXXMAINT DELETE (Delete CXX Definitions) (14.0). Note that for version 15.1, an enhancement was released that will allow an obsoleted table to be deleted from the CXX while the base is open. Please see the CXXMAINT DELETEOP function for details.

For For CA Datacom/DB version 15.0, see Reference / DBUTLTY Reference / Utility Function Summary / CXXMAINT (Maintain Directory) / CXXMAINT DELETE (Delete CXX Definitions) (14.0).

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