What is a load all subfile?

Quite simply, an RPG load all subfile is loaded until all rows are read, or the subfile has reached its maximum size of 9999 rows.

A load all subfile is one in which we generally specify the subfile size as 9999 in the record format itself. However, you may define the subfile size to be less than 9999 in the record format and still load all your rows into that subfile at a time.

A load all subfile will be defined as 9999 max but may contain any amount of data from NOTHING up to 9999 rows. 

Load all subfiles are the easiest concept in subfile. Especially when the subfile is display only!

Let's see the example of a very simple load all subfile which has a simple subfile layout with one field (a counter that increments from 1 to 9999).

DDS for the Display File (DSPF)

What is an IBM-i RPG 'LOAD ALL' Subfile? 1

RPG for the SUBFILE

The source code with explanation of the ILE RPG program to process the load all subfile in the above example is given below.

What is an IBM-i RPG 'LOAD ALL' Subfile? 2

And the subroutine that loads this simple little subfile looks like this:

What is an IBM-i RPG 'LOAD ALL' Subfile? 3

Want to play with this code yourself? Subscribers can download all the sample code from the DOWNLOADS page on this course

Now it's time to walk through every line of code and explain exactly what it is doing, why it's doing it and how it is doing it. Dive into the next video lesson!!!

Resources

Resource 1

NOOBDSPF - The Display File Source

Resource 2

NOOBSFL1 - The RPG in AS400 ISERIES Style

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>