bdfd1m1s | Database Administration |
The following scenario addresses maintaining a log file.
You want to log transaction data to a file for online access. The data becomes obsolete after a short time, so you want to keep only recent data. You do not want to write special maintenance and cleanup programs to maintain the log file.
The TPFDF product lets you control the number of overflow blocks by defining add current files. Each subfile consists of a prime block and a maximum number of overflow (pool) blocks. You specify the maximum number of overflow blocks in the DSECT (the range is 0 to 255).
The TPFDF product adds LRECs normally until it has allocated and filled all the allowed blocks. It then overwrites the oldest LREC with the new LREC that it is adding.
Implement this option by setting the number of blocks in the DSECT set symbol (&SW00NOC) and by setting &SW00OP1,#BIT2.
&SW00NOC SETC '3' &SW00OP1 SETC '..1.....'
No changes are necessary if the changes are made in the DSECT macro.
DBADD REF=zzzzzz,NEWLREC=location