ubmodtab – Modify stored table structure
ubmodtab [-cdi] [-a attribute] [-g group] [-k key] [-m mode] [-s sequence number] [-u user] [-x attribute] <table>
ubmodtab is used to create or change the storage structure of a table. It can be used to add or delete stored attributes, add a new index (key) or change the next sequence number to be used. It can also be used to change the ownership and access permissions of a table.
It is not necessary to use this utility when changing the expressions, associations, or class (subset) definitions in a table as these do not effect the storage structures.
Neither is it necessary to use ubmodtab on alias tables as changing the original is sufficient. However the dictionary for alias tables must still be changed.
COMMAND LINE OPTIONS
|OPTION ||DESCRIPTION |
|-a attribute || Add attribute to the stored structure of the table. In this case space is made in the table for the new attribute. |
Only one attribute may be added at a time, however it is possible to allocate a space large enough to fit several new variables and then change the dictionary again to reflect the real change required.
|-c || Create table(s) if they do not exist. This is the way new UNIBASE tables are created. With this option you can give more than one table name. Table creation will stop when all tables are created or there is an error reading one of the table definitions. |
This option can also be used in conjunction with -m (table mode), -g (group ownership), and -u (user ownership).
|-d ||debug. |
|-g group ||Set the group ownership of a table or list of tables to “group”. |
|-i || Increment sequence number. The next sequence number to be used is set to one more than the current number. |
|-k key ||Add the new index key to the table. |
|-m mode || Set the permission mode of a table or group of tables to “mode”. N.B. mode is a number with a leading zero (0). The meaning of the access mode bits is usually explained in chmod(1). |
The most common modes are 0666 – read write access for everyone, 0660 – read/write access for the owner and group, 0600 – read/write access for the owner only, and 0664 – read/write access for the owner and group with read access only for everyone else.
ubmodtab -m 0666 table
|-s sequence number ||The next sequence number to be used is set to sequence number. |
|-u user ||The owner of a table or list of tables is set to user. |
|-x attribute || Delete attribute from the table. After deleting the attribute the dictionary must be changed to be consistent with the change. |
Only one attribute may be deleted at a time.
table must be given.
Except for -m, -g, -u which can be used together or with -c the flags are mutually exclusive.