What is a Subfile

From Wikiversity
Jump to navigation Jump to search


  • A group of records that have the same record format and are read from and written to a display station in one operation. As the term suggests, a subfile is not a file; rather, it is a temporary place to store data of the same format to be used by a display file program..
  • A subfile is considered a “relative record” file since it may not be accessed by a key but only by a RRN.
  • The beauty of subfiles is that you can define them such that the number of records to be displayed fits on one display or exceeds the number of lines available on the display, allowing the user to scroll, or page, through the data. Subfiles also allow you an effective means of manipulating data in a database file.
  • Subfile programs are easy to write and maintain because much of the work is done for you in the data definition specifications (DDS).
  • For every subfile you describe in your DDS, you are required to use two format types: a subfile record format (SFL) and a subfile control record format (SFLCTL).


Types Of Subfiles:

There are three different type of Subfiles.

  • 1. Load All Subfile
  • 2. Expanding Subfile
  • 3. Single Page Subfile

Further reading:- Subfile Tutorial