Running a Program From a Menu-Driven Application - IBM - RPG

Another way to run an ILE program is from a menu-driven application. The workstation user selects an option from a menu, which in turn calls a particular program. illustrates an example of an application menu.

Example of an Application Menu
Example of an Application Menu

The menu shown is displayed by a menu program in which each option calls a separate ILE program. You can create the menu by using STRSDA and selecting option 2 (’Design menus’).

This shows the DDS for the display file of the above PAYROLL DEPARTMENT MENU. The source member is called PAYROL and has a source type of MNUDDS. The file was created using SDA.

Data Description Specification of an Application Menu
Data Description Specification of an Application Menu

This shows the source of the application menu illustrated. The source member is called PAYROLQQ and has a source type of MNUCMD. It was also created using SDA.

Source for Menu Program
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 calls the programs RPGINQ, RPGCHG, or RPGADD respectively.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM - RPG Topics