Subfiles structure, Anatomy of a subfile
A subfile basically has two parts (Twor record Formats)
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
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.