Previous Topic: MULTUSE= KeywordNext Topic: Area Level ACCESS


Database ACCESS

Database ACCESS controls all access (User Requirements Table open) to a database in a MUF, with the exception of the RESTART process done during the MUF enable.

ACCESS STATUS=WRITE

Allows all types of access.

ACCESS STATUS=OFF

Denies all types of access.

ACCESS STATUS=READ

Allows User Requirements Table opens, with UPDATE=NO specified or defaulted.

ACCESS STATUS=UTLTY

Allows all DBUTLTY functions and denies all OPENS that are not DBUTLTY, except the DBUTLTY function DBTEST with PGM=DBTSTPR, as it executes as though it is not part of DBUTLTY.

Database ACCESS is set by three processes:

A temporary, internal, parallel form of ACCESS=OFF is done during a CATALOG from CA Datacom Datadictionary.

The database level of ACCESS is typically done to stop, in an orderly fashion, access in a MUF because:

Following is an example of database ACCESS used to reorganize an entire database, without Simplify. In the example, the DBUTLTY functions BACKUP, INIT, and LOAD each execute in Single User mode with no knowledge of any MUF or its ACCESS status, and therefore do not require them. However, ACCESS helps ensure correct execution of the utility set because it verifies that no other job, which could either update data that would be lost or cause the INIT to fail with a return code 46, can open the base between the BACKUP and INIT.

  1. Use ACCESS to stop new jobs and wait on current jobs:
    ACCESS STATUS=OFF,DBID=1,USERS=WAIT
    
  2. Use COMM CLOSE to close the database:
    COMM OPTION=CLOSE,DBID=1
    
  3. Use BACKUP to back up the entire database:
    BACKUP DBID=1,...
    
  4. Use INIT to initialize the Index Area (IXX):
    INIT AREA=IXX,DBID=1
    
  5. Use LOAD to load the reorganized data:
    LOAD DBID=1,FORMAT=BACKUP,...
    
  6. Use ACCESS to allow new user jobs:
    ACCESS STATUS=WRITE,DBID=1