Subfile Terminology

Subfiles structure, Anatomy of a subfile

A subfile basically has two parts (Twor record Formats)

  1. Conrtol Format: As the name suggests, a control format is the record format which controls the behaviour of the subfile which it controls. Once control format can be associated with subfile record format only. The control format typically controls the Page size, Subfile Size, Function key definitions, Display control etc. and some optional features like + or More... sign when there're more records in a subfile.
  2. Subfile Record Format: A subfile record format consists of the iterating fields. That's all those tabular fields are defined inside the subfile record format.

Having known a little about subfiles, let us see a sample record format source of a subfile.
Example of a typical subfile of a Display file


Basic terms of a subfile
Page Size: Page size of a subfile is the number of records which are to be displayed at a time. The page number is specified in the control format of a subfile by keyword SFLPAGE as you can see in the example above.

Subfile Size: Subfile size is the initial number of records which are to be loaded in the subfile. The subfile size is specified by SFLSIZ keyword. The number of records specified by the subfile size are loaded in contiguous memory location. You may load more records than you specify in subfile size (Upto 9999) however they will not be contiguously placed in memory. Contiguos memory placement of subfile recrods results in higher performance.

ROLLUP: At any time only a limited number number of records are displayed on the screen. In a subfile the maximum number of records displayed is equal to the page size of subfile. To view next records we have to press the ROLLUP key. This key sometimes is "Page Up" and somtimes "Page Down".

ROLLUP is a keyword also which is defined in control format of a subfile and marks the expandable subfile when defined without ROLLDOWN.

ROLLDOWN: To view the previous records after pressing the ROLLUP key, we press the ROLLDOWN key. ROLLDOWN is a keyword also, It's explicitily defined in Single Page subfiles along with ROLLUP keyword in control format.