Monday, August 11, 2008


What Are Subfiles?
According to IBM, a subfile is 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.

Why Use Subfiles?
Subfiles are useful when you want to list multiple, similar records on a display. An additional 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.
Subfiles allow you to display lists of similar data that can extend beyond what fits on one screen. In most situations, this added capability would cost you something, but not with subfiles. They make it easier to create display applications, which, in turn, will make you more productive. Subfile programs are easy to write and maintain because much of the work is done for you in the data definition specifications (DDS). Most of the time, you can change the characteristics of a subfile program without modifying the RPG code driving it.

No comments: