For ISAM files, the so-called “WROUT function” (also called “write immediate”) can be used to control how often updated blocks are written to disk. If WROUT is active, each updated block is written to disk immediately, thus maintaining consistency between the data on the disk and the data in virtual memory. However, due to the increased number of I/O operations when WROUT is active, system performance drops considerably.
If the WROUT function is not active, I/O operations are executed only when the contents of the associated buffer area need to be replaced. This delay means, for example, that the number of write operations can be reduced if several records in the same block are updated.
The WROUT function can be activated explicitly or implicitly:
explicitly with WROUT=YES in the FILE or FCB macro for both K-ISAM files and NK-ISAM files.
explicitly with the operand WRITE-IMMEDIATE=*YES of the ADD-FILE-LINK command for both K-ISAM files and NK-ISAM files.
explicitly with WROUT=YES when task-specific ISAM pools are created by means of the CREPOOL macro; this then applies to all NK-ISAM files which are processed in this pool.
explicitly with WRITE-IMMEDIATE=YES when task-specific ISAM pools are created by means of the CREATE-ISAM-POOL command; this then applies to all NK-ISAM files which are processed in this pool.
implicitly when a host-specific ISAM pool is created using the CREPOOL macro or the CREATE-ISAM-POOL command. This applies to all NK-ISAM files which are processed in this pool.
ISAM pools which are not task-specific are created with the attribute WRITE-IMMEDIATE=YES by default. ISAM pools, in which updates are written to disk after a delay are, however, also permitted and can be created by explicitly specifying an appropriate parameter.implicitly with SHARUPD=YES in the FILE or FCB macro when a file is opened for shared-update processing (for both K-ISAM and NK-ISAM). When K-ISAM files with SHARUPD=YES are processed, updated blocks are always written to disk. In the case of NK-ISAM files, writing to disk is set as the default processing mode. It is, however, also possible to operate without using disks.
implicitly with SHARED-UPDATE=*YES in the ADD-FILE-LINK command when a file is opened for shared-update processing (for both K-ISAM and NK-ISAM). When K-ISAM files with SHARED-UPDATE=*YES are processed, updated blocks are always written to disk. In the case of NK-ISAM files, writing to disk is set as the default processing mode. It is, however, also possible to operate without using disks.
If the WROUT function is activated implicitly, it cannot be deactivated by the user (with the exception of NK-ISAM files), i.e. WROUT=NO in the FILE/FCB macro or WRITE-IMMEDIATE=*NO in the ADD-FILE-LINK command will have no effect.