bdfd1m1x | Database Administration |
The following scenario addresses managing a first-in-first-out (fifo) file.
A file is treated as a first-in-first-out (FIFO) queue, where LRECs are always deleted from the beginning and added to the end of each subfile. As records are deleted, when the prime block falls below the packing threshold (&SW00PIN), the subfile is packed even though the overflow blocks are still full. This packing operation is not necessary and causes a large amount of unnecessary inputs and outputs (I/Os).
Setting the packing threshold to zero is not adequate because the pack still occurs when the prime block becomes empty. Using the NOPACK parameter on the DBCLS macro prevents the pack, but as records are deleted, the number of empty blocks grows. This increases search time unnecessarily when the subfile is read.
Set the DELEMPTY parameter on the DBDEF macro to YES, which causes empty blocks to be deleted without a pack operation. Using DELEMPTY=YES with a packing threshold (&SW00PIN) of zero prevents packing while removing empty blocks that increase search time. You can still pack these files by using the ZUDFM OAP command or a ZFCRU command with the pack function specified.
&SW00PIN SETC '00' Packing threshold &SW00OP1 SETC '1.......' Backward chains required
DBDEF FILE=zzzzzz,DELEMPTY=YES