The bulkaddition option enables deferred key writes to improve performance of consecutive record additions. This is achieved by writing only the data record and postponing the key addition until the file is closed. When the file is closed, all pending keys are written in one single operation by an index rebuild routine. This technique of adding records has two benefits:
The bulkaddition option is available only for files opened with OUTPUT or EXTEND mode. The bulkaddition option is disabled by default.
Note: The bulkaddition option (available in FairCom RTG COBOL only) should not be used with the memoryfile option (because doing so would cause the indexes to be created on disk).
Accepted Values
Value |
Effect |
Synonyms |
---|---|---|
yes |
Enable the bulkaddition technique. |
y, true, on, 1 |
no |
Disable the bulkaddition technique. This is the default value. |
n, false, off, 0 |
Attributes
Value |
Effect |
Synonyms |
prmiidx |
Causes <bulkaddition> to allow the file to remain open so it can take advantage of the data cache when reading the data records to build the keys. When this option is disabled, bulkaddition uses RBLIFIL(), which closes the file and loses cached data. When enabled, it uses PRMIIDX(). The best performance of <bulkaddition prmiidx> can be achieved by ensuring that the data cache can fit the whole data file. The prmiidx option is off by default. |
|
Examples
To enable bulkaddition:
<bulkaddition>yes</bulkaddition>
To use the prmiidx optimization:
<bulkaddition prmiidx="yes">yes</bulkaddition>