Single Page Subfile SQLRPGLE Example Program
#IBMiSample – Improve Subfile Performance by Loading One Page at a Time The traditional subfile can display up to 9,999 rows and works perfectly in many scenarios. However, when dealing with large datasets or heavy filtering , loading every matching record before showing the first page can drastically slow down the user experience. Based on comments I received from IBM i developers, here are two practical cases that clearly explain why loading only one page at a time is often a better solution. Scenario 1 — Small File Subfile size: 20 rows Total records: 5,000 Filtered records: 280 (for example: FLAG = 'X' and creation date in a selected range) With a standard subfile , the program displays the first page only after scanning all 5,000 records . With a single-page load , the program stops as soon as it finds the first 20 matching records and immediately displays the first screen. This is significantly faster and improves usabilit...