IBM AS/400 Frozen Dessert Maker User Manual


 
Running a Program From a Menu-Driven Application
A* Free Form Menu: PAYROL
A*
A DSPSIZ(24 80 *DS3 -
A 27 132 *DS4)
A CHGINPDFT
A INDARA
A PRINT(*LIBL/QSYSPRT)
A R PAYROL
A DSPMOD(*DS3)
A LOCK
A SLNO(01)
A CLRL(*ALL)
A ALWROL
A CF03
A HELP
A HOME
A HLPRTN
A 1 34'PAYROLL DEPARTMENT MENU'
A DSPATR(HI)
A 3 2'Select one of the following:'
A COLOR(BLU)
A 5 7'1.'
A 6 7'2.'
A 7 7'3.'
A* CMDPROMPT Do not delete this DDS spec.
A 019 2'Selection or command -
A '
A 5 11'Inquire'
A 5 19'into'
A 5 24'employee'
A 5 33'master'
A 6 11'Change'
A 6 18'employee'
A 6 27'master'
A 7 11'Add'
A 7 15'new'
A 7 19'employee'
Figure 50. Data Description Specification of an Application Menu
Figure 51 shows the source of the application menu illustrated in Figure 49 on
page 106. The source member is called PAYROLQQ and has a source type of
MNUCMD. It was also created using SDA.
PAYROLQQ,1
0001 call RPGINQ
0002 call RPGCHG
0003 call RPGADD
Figure 51. Source for Menu Program
You run the menu by entering:
GO library name/PAYROL
If the user enters 1, 2, or 3 from the application menu, the source in Figure 51 calls
the programs RPGINQ, RPGCHG, or RPGADD respectively.
Chapter 9. Running a Program 107