IBM AS/400 Frozen Dessert Maker User Manual


 
Search and Inquiry by Name
SFLDSPCTL indicates when to display the subfile-control record format (when
indicator 55 is off).
SFLDSP indicates when to display the subfile (when indicator 55 is off).
SFLSIZ specifies the total size of the subfile. In this example, the subfile size is
13 records that are displayed on lines 9 through 21.
SFLPAG defines the number of records on a page. In this example, the page
size is the same as the subfile size.
ROLLUP indicates that indicator 95 is set on in the program when the roll up
function is used.
The OVERLAY keyword defines this subfile-control record format as an overlay
format. This record format can be written without the OS/400 system erasing the
screen first. F4 is valid for repeating the search with the same name. (This use of
F4 allows a form of roll down.)
The CUSDSP record format displays information for the selected customers.
SCHNAM: RPG Source
*****************************************************************
* PROGRAM NAME: SCHNAM *
* RELATED FILES: CUSMSTL3 (LOGICAL FILE) *
* SNAMMENU (WORKSTN FILE) *
* DESCRIPTION: THIS PROGRAM SHOWS A CUSTOMER MASTER SEARCH *
* PROGRAM USING WORKSTN SUBFILE PROCESSING. *
* THIS PROGRAM PROMPTS THE USER FOR THE CUSTOMER*
* NAME AND USES IT TO POSITION THE CUSMSTL3 *
* FILE BY THE SETLL OPERATION. THEN IT DISPLAYS *
* THE RECORDS USING SUBFILES. *
* TO FILL ANOTHER PAGE, PRESS THE ROLL UP KEY. *
* TO DISPLAY CUSTOMER DETAIL, ENTER 'X' BESIDE *
* THAT CUSTOMER AND PRESS ENTER. *
* TO QUIT THE PROGRAM, PRESS PF3. *
*****************************************************************
FCUSMSTL3 IF E K DISK
FSNAMMENU CF E WORKSTN SFILE(SUBFILE:RECNUM)
C CSTKEY KLIST
C KFLD SRCNAM
C ZIPKEY KLIST
C KFLD NAME
Figure 189 (Part 1 of 3). Source for module SCHNAM
366 ILE RPG for AS/400 Programmer's Guide