bdfd1m1rDatabase Administration

Logging Data at Optimum Intervals

The following scenario addresses logging data at optimum intervals.

Problem

An application requires data to be logged to a tape. Writing each modified LREC to tape would create an unacceptably high overhead.

Solution

Specify the TAPE parameter with the DBOPN macro or dfopn function for the file. When an LREC is added to the prime block, the TPFDF product does not write it to tape but waits until the block is full. When the prime block is full, the TPFDF product writes the block to the tape specified in the TAPE parameter and reinitializes the prime block.

Notes:

  1. The application can read data in the prime block between tape logging operations.

  2. B+Tree files cannot be opened using the TAPE parameter.

DSECT Set Symbols

Not applicable.

DBDEF Statements

Not applicable.

Application Coding

      DBOPN REF=zzzzzz,HOLD,....,TAPE=xxx
      DBADD REF=zzzzzz,NEWLREC=location