IBM AS/400 manual Running a Program From a Menu-Driven Application

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 130
Image 130
Running a Program From a Menu-Driven Application

Running a Program From a Menu-Driven Application

A*****************************************************************

A* DESCRIPTION: This

is the

DDS

for the physical file EMPMST.

*

A*

It

contains

one

record

format

called EMPREC.

*

A*

This

file contains one

record

for each employee *

A*

of

the company.

 

 

 

*

A*****************************************************************

A*

AR EMPREC

A

ENUM

5

0

TEXT('EMPLOYEE NUMBER')

A

ENAME

20

 

TEXT('EMPLOYEE NAME')

A

ETYPE

1

 

TEXT('EMPLOYEE TYPE')

A

EDEPT

3

0

TEXT('EMPLOYEE

DEPARTMENT')

A

ENHRS

3

1

TEXT('EMPLOYEE

NORMAL WEEK HOURS')

AK ENUM

Figure 48. DDS for EMPRPT2

Running a Program From a

Menu-Driven

Application

 

 

 

Another

way to

run

an

ILE program

is

from a menu-driven application. The

station

user selects an option from a

menu, which in turn calls a parti

Figure 49 illustrates

an

example of

an

application menu.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PAYROLL DEPARTMENT MENU

Select one of the following:

1.Inquire into employee master

2.Change employee master

3.Add new employee

 

Selection or command

 

 

 

 

===> _________________________________________________________________________

 

 

 

_______________________________________________________________________________

 

 

 

 

F3=Exit

F4=Prompt F9=Retrieve F12=Cancel

 

 

 

F13=Information Assistant

F16=AS/400 main menu

 

 

ˆ

 

 

 

 

˜

 

 

 

 

 

 

 

 

 

Figure

49.

Example of an Application Menu

 

 

The

menu

shown

in Figure 49 is displayed by a menu program in

which

ea

option

calls a

separate ILE program. You can create the menu

by

using

and

selecting

option

2 ('Design menus').

 

 

Figure 50 on page 107 shows the DDS for the display file of the above DEPARTMENT MENU. The source member is called PAYROL and has a source type of MNUDDS. The file was created using SDA.

106 ILE RPG for AS/400 Programmer's Guide

Page 130
Image 130
IBM AS/400 manual Running a Program From a Menu-Driven Application