DB13001E - UNEXPECTED RETURN CODE 46 (1) (or 46(46)) returned

book

Article ID: 186042

calendar_today

Updated On:

Products

Datacom DATACOM - AD Datacom/DB

Issue/Introduction

Why does a batch job return:

DB13001E UNEXPECTED RETURN CODE 46 (46) BASE OPEN IN ANOTHER COPY OF DATACOM

or

DB13001E - UNEXPECTED RETURN CODE 46 (1) CLOSE/STATS ERROR

message?

Environment

CA Datacom/DB
CA Datacom/AD 

Resolution

If a CA Datacom job fails with RC 46(46) or 46(1), you can ascertain the jobs, including any CICS regions using Datacom, which have already that database is OPEN for UPDATE. 

Run the following DBUTLTY batch job with SYSIN:

  ACCESS STATUS=OFF,DBID=nnnn,USERS=FAIL

If the Datacom MUF has it OPEN for job(s) or by virtue of ACCESS OPTIMIZE, it will issue the following message showing which job(s) have it open for UPDATE.

  DB00607I BASE nnnn ACCESS status (information) (job names) (x) (j)

where (j) lists the job(s)that have opened the database for "UPDATE" inside MUF.

Please note that the above card set the ACCESS status to OFF anyway, even if the DBUTLTY failed. See "How does ACCESS OFF work with USERS=WAIT and USERS=FAIL?" article for details

Additional Information

CA DATACOM MESSAGES section "CA Datacom/DB Return Codes Quick Reference" for the list and explanation of return codes, such as RC 46 
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/database-management/ca-datacom-messages/1-0/ca-datacom-db-messages/ca-datacom-db-return-codes/return-code-46-table-already-open-for-update.html


CA DATACOM MESSAGES for details on DB00607I

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/database-management/ca-datacom-messages/1-0/ca-datacom-db-messages/processing-dbutlty-and-sql-messages/ca-datacom-db-processing-messages-db0xxxxc/db00607i.html


Article 142943 "CA Datacom DB00501E RC 46(46) Database Open error"
https://ca-broadcomcsm.wolkenservicedesk.com/wolken/esd/knowledgebase_list?articleId=142943

There are also two Datacom Dynamic System Tables (DST) available to DBSQLPR SQL SELECT or SYSVIEW for the database access and status: 
   DIR_DATABASE
   MUF_OPEN_BASES

Refer to CA DATACOM CORE 15.1 "Dynamic System Tables"
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/database-management/ca-datacom/15-1/reference/system-tables-reference/dynamic-system-tables.html