Unable to close DBID to reduce area extent count RC 46(1) & DB00622I OPEN WITH USERS
search cancel

Unable to close DBID to reduce area extent count RC 46(1) & DB00622I OPEN WITH USERS

book

Article ID: 260955

calendar_today

Updated On:

Products

Datacom/DB

Issue/Introduction

One of my Datacom data areas has reached 16 extents and I needed to reallocate the file to reduce the data area's extent.
However, I could not close the DBID to release it from the MUF region's hold. 

Here is what I did :

  1. Close the DB in CICS by issuing console cmd : F CICSRFSQ8,DBOC CLOSE=nnn
    The command was successful
    +DC00169I  URT nnn  NOW CLOSED   
    +DC00380I  TRANSACTION COMPLETED.

  2.  Close the DB in MUF  by issuing console command: F MUF,CLOSE nnn
    It failed with:

    DB01311I - CLOSE nnn                             
    DB01335I - CONSOLE SCHEDULED - CLOSE nnn        
    DB00622I - COMM CLOSE 435 IGNORED, OPEN WITH USERS
    DB00608I - CONSOLE COMPLETE - CLOSE nnn       
      
  3. I ran DBUTLTY to close the DB, but it failed with the following error :

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

Environment

Release : 15.1

Resolution

If an area is allocated to one volume it can only have 16 extents.
However, if you have specified multiple volumes for the area you can have up to 16 extents on each volume. 
If the file is defined with only one volume you can add more volumes to it.
For SMS files see article 33629 Adding volumes to SMS-managed database files in CA Datacom
For non-SMS files see article 218342 Adding multiple disk pack volumes to Datacom files without SMS

Otherwise to keep the file in one volume you need to perform the following procedure to reduce the number of extents:

  1. CLOSE the DBID
  2. Run a DBUTLTY BACKUP of the area
  3. Re-allocate a larger file with reduced extents
  4. Run a DBUTLTY  LOAD of the area

Procedure to close the DBID

  1. Close the DBID in CICS by command:

    DBOC CLOSE=nnn

  2. Run DBUTLTY with the following 2 commands:

     ACCESS STATUS=OFF,DBID=nnn,USERS=FAIL  
     COMM OPTION=CLOSE,DBID=nnn              

  3. The ACCESS command will prevent any new OPENs of the DBID. If the ACCESS and CLOSE commands are successful then recreate the file and continue with step 8.
    If the ACCESS command fails, it will tell you what job has the DBID open.
    For more information see article 14064 How does ACCESS OFF work with USERS=WAIT and USERS=FAIL?

  4. If the ACCESS command indicates a batch job that has the DBID open it will need to be terminated.

  5. If the ACCESS command indicates CICS has the DBID open and the DBID has already been closed with DBOC, it could be due to a dynamically created URT.
    To find out if there are any dynamically created URTs do the following:
    1. Issue CICS command:
      DBOC INQ=???.???.nnn

      Dynamic URTs will look like this:
      URT 0001(DYN OPEN    AUTO ) ...
          0001 TABLE:ABC  DBID:nnn UPDATE...

    2. If  a dynamic URT  exists you need to close it with CICS command:
      DBOC CLOSE=001

      For more details see article 15325 After DBOC CLOSE, why would the database be open in CICS?
      and article 21741 How to avoid the creation of SQL dynamically generated URTs?

  6. If you have application programs that issue SQL commands you also need to close the SQL URT (default 20) in CICS.
    Closing the SQL URT will prevent all SQL access so you need close it and then reopen it, do the following:
    1. Issue CICS command:
      DBOC CLOSE=20

    2. Wait for it to complete then issue CICS command:
      DBOC OPEN=20 or DBOC RESTART=20 

  7. After closing all the URTs in CICS run DBUTLTY again with the following 2 commands:
     ACCESS STATUS=OFF,DBID=nnn,USERS=FAIL  
     COMM OPTION=CLOSE,DBID=nnn    

  8. To re-enable access after the new file is created run DBUTLTY with: 
      ACCESS STATUS=WRITE,DBID=nnn
      

Additional Information

See Datacom documentation section ACCESS (Restricting Opens or Maintenance)