This example describes a combined method of paging a subfile that uses system resources efficiently.
In some applications, the number of records in the subfile might be quite large. However, the application user might want to view only the first page or two of these records. In this case, it might be faster and more efficient for the application program to build the subfile a page at a time as requested by the user. The i5/OS™ operating system handles the paging of records in the subfile. It also returns a Page Up key indicator to the high-level language program when another page should be added to the end of the subfile. The application user can detect no difference between a page-up request handled by the i5/OS operating system and one handled by the high-level language program.
NAME DEPARTMENT PHONE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX NNNN
SFLPAG
SFLSIZ
The SFLSIZ value is larger than the SFLPAG value. The subfile is paged by the SFLPAG value.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R SETSFL SFL 00020A 50 SFLNXTCHG 00030A NAME 30 0 5 2 00040A DEPT 10 5 40 00050A PHONE 4 0 5 58 00060A R SETCTL SFLCTL(SETSFL) 00070A SFLSIZ(0034) (1) 00080A SFLPAG(0017) 00090A 40 SFLDSP 00100A 41 SFLDSPCTL 00110A 42 SFLDLT 00120A 43 SFLCLR 00130A 49 SFLEND (2) 00140A N49 ROLLUP(26) 00150A LOCK 00160A OVERLAY 00170A SETRRN 4S 0H SFLRCDNBR(CURSOR)(3) 00180A 3 2'NAME' 00190A 3 40'DEPARTMENT' 00200A 3 58'PHONE' A
Records in the subfile with changed input fields (modified data tags) will be changed after a new page is added to the subfile by the high-level language program.