Write an Expanding Page Size Subfile using RPG on the AS400

  • Home
  • /
  • Blog
  • /
  • Write an Expanding Page Size Subfile using RPG on the AS400

October 10, 2008

Write an Expanding Page Size Subfile using RPG on the AS400

By NickLitten

October 10, 2008

SFLPAG, SFLSIZ, SFLSIZE

Expandable subfiles in RPGLE

An expandable subfile is one in which ideally one page of records are loaded at a time. Subsequent pages are added to the subfile as per the user demand.

In the expandable subfile the subfile size must be at least one greater than the page size.

The ILE RPG program to process an expandable subfile has typically the following flow

1. Load the subfile: Initially the only the first one page of the subfile is loaded.
2. Display the subfile: The subfile screen is displayed to the user.
3. Rollup: Check if user pressed the rollup key. Many a times no rollup is defined and the next page is loaded with ENTER (RETURN) key only. If ROLLUP key has been pressed, load the next page and display it.

Note: In expandable subfiles, we do not need to handle ROLLDOWN. This is handled by the system itself. This is because we do not clear subfile before loading the next page. The next page records are simply added to already existing first page.

Want to see the code?

Learning Something New

“I am always ready to learn although I do not always like being taught.” — Winston Churchill

All courses…
  • All courses…
  • Topics
  • Modernization
  • IBM i | AS400 | iSeries
  • WordPress
  • Access restrictions
  • MEMBERS ONLY
  • Free For All

51 Lessons – Easy

Not started

RPG Programming for Beginners.
Aimed at programmers that have (a) no knowledge of the RPG ILE language or (b) knowledge of older RPG versions and want to upgrade to modern ILE Web powerful RPGLE.

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

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>