Previous Topic: Record LockingNext Topic: Journaling for Audit Trail Purposes


Subfile Processing

Subfiles should not load more records than they need, as to do so is slow and consumes storage. Use program controlled roll up. Each consecutive page of the subfile should only be loaded when the ROLLUP key is pressed (this requires allocation of an indicator to the subfile rollup key). An exception to this rule may occur when control totals for the subfile contents need to be calculated or checked, so all the records must be read in any case.

For more information, refer to the section, Design Standards for Display Files.

The following technique can be used to give a fast performance when processing an input-capable subfile loaded from database records, which requires subsequent update back to the database:

  1. To load the subfile, use an input-only logical view of the database file to read the records in the desired order, a subfile page full at a time.
  2. Store the relative record numbers of the database records as hidden fields on each subfile record.
  3. Use relative record processing with a second, arrival-sequence access path on the database file to update the changed records from the subfile to the database.