Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Modifying the Schema DDL

If you want to modify your Schema DDL, you must create a new or modified complete schema definition and recompile this. The new names must be used at all places in the DDL and SSL sources.
BALTER checks the renaming and updates the structure information.

To ensure that BGSIA recognizes renamed realms, record types and sets and leaves the existing references unchanged, name changes which are to be made for realms, record types and sets must be specified in full in additional statements.

The following modifications are possible in the Schema DDL:

  • Changing item names in record types
    The names must be changed at all places (e.g. also in key definitions).

  • Changing types of items
    The length in bytes of the data items may not be changed. Type changes from CHAR and to CHAR are possible. In the case of conversion to NCHAR only half the characters are stored in the new item. Type changes of variable items and of items in compressed records are not permitted.

  • The user data in the database also remains physically unchanged in the event of a type change. No check is made to see whether it is compatible with the new type. Type changes therefore require special measures to adapt the user data stored in the user realms (see "Adapting user data").
    When an item is changed to a numeric type, you may need to take necessary alignments of the numeric type into account.

  • Splitting an existing item of the type CHAR into multiple items
    The total length must be retained here. If the source item is used as a key item, it must be retained as such by using the new items. The special features regarding the modification of NCHAR and numeric types apply in accordance with the changes to the type of an individual item. Splitting an item into multiple items requires special measures to adapt the user data stored in the user realms (see "Adapting user data").

  • Grouping existing adjacent items to form an item of the type CHAR
    The total length must be retained here. Grouping is not possible if any of the individual items concerned is used as a key item. The grouping of multiple items requires special measures to adapt the user data stored in the user realms (see "Adapting user data").

  • Grouping a vector to form an item of the type CHAR
    The total length must be retained here. The grouping of a vector requires special measures to adapt the user data stored in the user realms (see "Adapting user data").

  • Converting an item of the type CHAR to a vector
    The total length must be retained here. The generation of a vector requires special measures to adapt the user data stored in the user realms (see "Adapting user data").

  • Grouping a repeating group to form one or more items of the type CHAR
    The total length must be retained here. The grouping of a repeating group requires special measures to adapt the user data stored in the user realms (see "Adapting user data").

  • Converting one item or multiple adjacent items of the type CHAR to a repeating group
    The total length must be retained here. The generation of a repeating group requires special measures to adapt the user data stored in the user realms (see "Adapting user data").

  • Using any existing free bytes in front of an implicitly aligned numeric item (FIXED BINARY) for new items on Level 0
    In repeating groups FIXED BINARY items in the stored records are not aligned. There are consequently no implicit free bytes in front of these items.

  • Restructuring multiple existing items into multiple new items
    Two RENAME/BALTER cycles must be executed to permit restructuring. First the source items are grouped to form a CHAR item. In a second step this CHAR item can be split in the new structure. This procedure can be used above all for grouping or splitting NCHAR items.

  • Renaming items of the type DBKEY or DBKEY-LONG
    Items of the type DBKEY or DBKEY-LONG which are used with LOCATION MODE DIRECT cannot be grouped with other items in a renaming cycle.

  • Renaming record types
    Renaming must be performed at all places in DDL and SSL.

  • Renaming sets
    Renaming must be performed at all places in DDL and SSL.

  • Renaming realms
    Renaming must be performed at all places in DDL and SSL. An old realm name may not immediately be used in a renaming step as a new name for another realm. No file with the new file name of the user realm may exist.