Using bulk addition can provide very significant performance gains in certain cases. These cases involve writing a very large
number of records to a file. In order to optimize performance, certain rules of COBOL are changed and some other restrictions
apply. Here are the key points to remember:
- Files open for bulk addition are locked for exclusive use.
- WRITE does not add keys to the file. The keys are added when some other file operation occurs.
- Duplicate record errors (status 22) are not returned by WRITE. Instead, they are reported to the file's declarative procedure only during some other file operation.
- The declarative must not perform any file operations or start or stop any run units when processing status 22.
- You may log records rejected due to illegal duplicated keys by setting the option DUPLICATES_LOG to the name of the desired
- Disk space occupied by deleted records is not re-used when you are adding records with bulk addition.
- You can report on the progress of adding the keys in a USE FOR REPORTING declarative. This declarative may not perform any
file operations or start or stop any run units.
- You may not use bulk addition on files you are accessing via AcuServer. Use AcuConnect or some other technique to start the
job directly on the machine with the files.
Avoid doing an abnormal shutdown on a job running with bulk addition. If the job aborts without completing its "close" operation,
the file will almost certainly have keys missing and need to be rebuilt.