If a realm is to be capable of online extension, it must have enough storage space available to it at the time of the extension. This condition is satisfied if the realm possesses a sufficient number of file pages at the time the extension is performed or if dynamic file extension is possible for the realm.
You use the BS2000 command CREATE-FILE to allocate storage space when creating a realm file (see the manual "Creation and Restructuring", Preparing database creation). You can subsequently use the MODIFY-FILE-ATTRIBUTES command to modify the storage space allocation.
A distinction is made between primary and secondary storage space allocations:
The primary allocation reserves a fixed number of file pages for a new file. In the case of existing files, the primary allocation assigns a fixed number of additional file pages.
A secondary allocation with a value greater than 0 enables the dynamic extensibility of the file. You can choose any value for the secondary allocation subject to the specific requirements and constraints. It should be harmonized with the scope of the online realm extension that you specify with the ACT INCR command on activation.
Storage space must be assigned to a realm file offline, for reasons related to DMS. It is therefore advisable to monitor the current secondary assignment values of the realm files, so as to be able to adapt them if necessary when the database or the realm has been switched offline for maintenance reasons.
The file size of a realm as understood within DMS does not provide a direct indication of the number of database pages, since the file can contain more PAM pages than are actually used as database pages. During a realm extension, a file extension always takes place if database pages which should logically be added to the realm by the DBH are not in the file. The scope of the file extension depends on the number of this type of database pages and on the secondary assignment which has been set.