By default, BPGSIZE creates a converted realm on a public volume with the same size as the original realm.
If desired, you can use the BS2000 CREATE-FILE command to have the file for a converted realm selectively created under a specific catalog ID or on a private disk.
File name of the converted realm
The file name of the new converted realm is as follows: dbname.realm-name.NEW
dbname | |
Name of the converted database | |
realm-name | |
Name of the realm that is converted. |
Calculating storage space for the converted realm
The approach followed by BPGSIZE during conversion is outlined below to assist you in determining whether the converted realm will require more space than the original realm and how the primary allocation for the converted realm should be selected.
Factors due to which additional storage space may be required for the converted realm in some circumstances:
When a 2-Kbyte database is converted to the 4-Kbyte or 8-Kbyte format, the 2048 byte page length of the original realm is not exactly doubled, but quadrupled. Furthermore, since each record must be fully stored within one page, a new 4000-byte or 8096-byte page is generally not enough for the contents of two or four full 2048-byte pages.
When converting a 2-Kbyte database to the 4-Kbyte or 8-Kbyte format, BPGSIZE converts hash areas by mapping each direct or indirect CALC page with a length of 2048 bytes to a new CALC page of 4000 or 8096 bytes on a one-to-one basis. When a 4-Kbyte database is converted to the 8-Kbyte format, a CALC page with a length of 4000 bytes is mapped on a one-to-one basis to new CALC page of 8096 bytes. The initial storage space required in the converted realm for hash areas is thus double or four times the original space.
If the value specified for TABLE-FILLING in the CONVERT-DATABASE statement is too low (see "Statements for BPGSIZE"), the tables in the new realm will not be fully filled by BPGSIZE. If the occupancy level of the tables is reduced as a result, more space is required.
Factors that may reduce the required storage space for the converted realm in some circumstances:
Only the pages in the original realm that already contain records or tables are transferred by BPGSIZE to a page of the converted realm; empty pages are ignored.
BPGSIZE fills pages of the converted realm with records and tables to the maximum extend possible. The storage space required for the converted realm is thus reduced if the original realm contains several partially-filled page.
BPGSIZE reduces the number of overflow pages for hash areas and duplicates tables wherever possible.
Automatic creation of the converted realm by BPGSIZE
If the realm dbname.realm-name.NEW is created by BPGSIZE, an FPA area of the same size as that of original realm dbname.realm-name is created by BPGSIZE for dbname.realm-name.NEW.
Note that the new realm dbname.realm-name.NEW may become too large for the FPA area calculated by BPGSIZE due to file extensions and thus cause the conversion to be aborted by BPGSIZE with an error message. If this occurs, you will need to use the BS2000 CREATE-FILE command to create the file for the realm dbname.realm-name.NEW with a larger primary allocation and then start the conversion of the realm with BPGSIZE again.
Creating the file for the converted realm
If the converted realm requires more space than the original realm, you will need to create the file dbname.realm-name.NEW for the converted realm yourself. This can be done with the BS2000 CREATE-FILE command. (see "Maximum size of UDS/SQL files" in chapter "Files and realms of a UDS/SQL database").
In this case, BPGSIZE calculates the required size for the FPA area from the primary allocation specified in the CREATE-FILE command. BPGSIZE then creates the FPA area for the converted realm using this calculated value, provided it is greater than the one for the original realm.
If you specify a value of less than 576 PAM pages as the secondary allocation, the value for the secondary allocation is automatically set to 576 PAM pages by BPGSIZE.
Converting realms with distributable lists
When realms which participate in a distributable list are converted (and must therefore be converted in a single BPGSIZE run), you must bear in mind that the conversion attempts to distribute the records of the member record type in the distributable list evenly over the realms.
If the distribution over the realms was previously very uneven, before conversion takes place you should explicitly create the new realms with a size which takes into consideration even distribution (for this purpose you can use BSTATUS to obtain information on the location and distribution of the records over the various realms). If you do not create the realms explicitly, they will be created with the current size without taking the intended even distribution into consideration. This might then lead to abnormal termination while attempting even distribution as BPGSIZE does not extend the new realms.