Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Initiating renaming using BRENAME

The task of BRENAME when renaming a database is comparable to that of BCREATE when creating a database: BRENAME prepares the compiler database to incorporate the new schema. Specifically, BRENAME performs the following preliminary work for renaming:

  • It saves the old SIA in the DBDIR and prepares the DBDIR for incorporating a new SIA so that after the BGSIA run a new and an old SIA are present in the DBDIR for the schema. BALTER needs both SIAs when the structure data is adapted to the new schema to enable it to recognize the differences in the new schema compared to the old schema.
    Consequently you must ensure that enough free pages are available in the DBDIR or that automatic realm extension is possible by means of secondary allocation > 0.

  • It deletes all user SSIAs in the DBDIR.

  • It saves the old DBCOM in the file dbname.DBCOM.O and reformats the DBCOM.

    BALTER requires the schema information of the old and new DBCOM to check the planned renaming.

  • It saves the old COSSD in the file dbname.COSSD.O.

    After renaming the DDL compiler requires the old COSSD to transfer the compatible subschemas. It is therefore advisable to keep the dbname.COSSD.O file available until all subschemas have been recompiled.

     Figure 34: System environment when preparing the compiler database

BRENAME automatically stores the copies of DBCOM and COSSD on public disks. It is not necessary to issue a CREATE-FILE command to set up the two files (before BRENAME is started) unless the copies are to be stored on private disks.
Depending on the size of the files it is, however, advisable to set them up using a CREATE-FILE command with SPACE operand - even if they are to be stored on public disks (see "Maximum size of UDS/SQL files" in chapter "Files and realms of a UDS/SQL database").

When required, BRENAME automatically extends the realms of the database being processed. For details, please refer to the “Database Operation” manual, Automatic realm extension by means of utility routines.

At startup BRENAME takes into account any assigned UDS/SQL pubset declaration (see the “Database Operation” manual, Pubset declaration job variable). Faulty assignment leads to the program aborting.

Command sequence for starting BRENAME

It is assumed for the command sequence described here that UDS/SQL was installed with IMON (see section "START commands for the UDS/SQL programs").

The BRENAME utility routine is started by the following commands in the identification under which the database is cataloged:

01  [/CREATE-FILE FILE-NAME=dbname.DBCOM.0 ...]

02  [/CREATE-FILE FILE-NAME=dbname.COSSD.0 ...]

03  /ADD-FILE-LINK LINK-NAME=DATABASE,FILE-NAME=dbname.DBDIR

04  /SELECT-PRODUCT-VERSION PRODUCT-NAME=UDS-SQL,VERSION=version,SCOPE=*TASK

05  /START-UDS-BRENAME

06  END

01,02

04

See section "Setting up the compiler database".

The specified version of BRENAME is selected.
It is generally recommended that you specify the version since it is possible for several UDS/SQL versions to be installed in parallel.

05

06

The UDS/SQL utility routine can also be started with the alias BRENAME.

BRENAME is terminated.

The END statement is the only BRENAME statement.