How to create a subfile in as400

What is subfile in as400?

A subfile is a group of records that is read from or written to a display-device file. For example, a program reads records from a database file and creates a subfile of output records. When the entire subfile has been written, the program sends the entire subfile to the display device in one write operation.

How do you create a subfile in Rpgle?

Ü Load-All Subfile

9999 is the buffer limit. In this case PAGEUP AND PAGEDOWN is taken care by system. SFLPAG should be less than SFLSIZ. In load-All subfile if we do PAGEDOWN and then press ENTER on the page, by-default ENTER bring the display screen to the very first page irrespective of the current page number.

What is subfile?

: a file (such as a computer file) that is part of a larger file or derived from parts of larger files You simply search through existing files for all the records matching a particular set of criteria and designate those records as a subfile.—

How do I display an empty subfile?

All that is needed to correct this problem on the AS/400 is to successfully load the subfile one time in the program. After that, it can be displayed even when it is empty. I achieve this by adding a few lines of code in my “INIT” subroutine (see 1) which is only executed once during the program.