The MODIFY-REALM-SIZE statement can be used to change the size of a realm of the database.
MODIFY-REALM-SIZE | ||||||||||||||||
|
REALM-NAME = <realm-name>
Name of the realm which is to be modified.
REALM-SIZE = <integer 1..16777216>
The new size is equivalent to the specified value in database pages.
REALM-SIZE = *RELATIVE (...)
The new size is calculated from the old size and the specified difference (which may be a positive or negative value), but cannot be less than the size attained by specifying MINIMUM.
DIFFERENCE = <integer -16777216..16777216>
Difference with respect to the old realm size in database pages.
REALM-SIZE = *MINIMUM
The realm is reduced by the number of empty pages at the end.
Enlarging a realm
The physical enlargement of the file realm-name is requested by BREORG from the BS2000 DMS. The new pages are collected by the free place administration of the realm. If there is not enough free space (as determined by the free place administration, FPA) for the realm, then new free place administration tables (FPA-Extents) are created as needed.
When the DBDIR or DBCOM is expanded, the new, empty pages are always formatted. Whether or nor new, empty pages are formatted when expanding a user realm depends on the state of the probable position pointers (PPP):
If the probable position pointers were updated in all user realms with the REORGANIZE-POINTERS statement, then the new, empty pages are not formatted.
If a probable position pointers reference in the new pages cannot be ruled out, then the new, empty pages are formatted.
If you are using private disks for storage, you should ensure that the disk provides sufficient space for enlarging the realms.
If the disk on which the realm ends does not have enough space for a realm enlargement, a continuation disk must be assigned for the file before the BREORG run.
Reducing a realm
BREORG reduces the size of the realm in the following manner: First, the achievable realm size is determined from the results of the MODIFY-REALM-SIZE command and the data in the realm. Unneeded FPA sections are released. FPA sections still needed are generally moved to the beginning of the realm (if this is possible). BREORG then requests the physical reduction of the realm via the DMS of BS2000, so no MODIFY-FILE-ATTRIBUTES statement is required to reduce the realm file.
Reorganization of occupied pages in the realm is not connected with this statement; only free pages are removed from the end of the realm and the free place administration is adjusted.
The realm DBDIR may only be modified under the PRIVACY-AND-IQF-SCHEMA.
The name DBDIR is internally converted to the realm name DATABASE-DIRECTORY, the name DBCOM to the realm name DATABASE-COMPILER-REALM.
Execution messages
On executing a MODIFY-REALM-SIZE statement, the results for the new free place administration (FPA) of a realm are output as follows:
| |
|
|
|
|
|
|
|
|
|
|
|
|
area-name
Name of the enlarged realm or reduced realm
area ref - page no
For FPA FIRST PAGE: Smallest act-key of all act-keys of FPA pages (not necessarily identical to the beginning of the FPA)
For FPA LAST PAGE: Largest act-key of all act-keys of FPA pages (not necessarily identical to the end of the FPA)
number extents
Number of FPA extents
number pages
For NEW FPA SIZE: Number of pages in the new FPA area
For NEW NR OF PAGES: New page count for the realm
number physical io
Number of physical input and output operations