IBM AS/400 Frozen Dessert Maker User Manual


 
Main Menu Inquiry
A*****************************************************************
A* FILE NAME: CUSMST *
A* RELATED PGMS: CUSMNT, SCHZIP, SCHNAM *
A* RELATED FILES: CUSMSTL1, CUSMSTL2, CUSMSTL3 (LOGICAL FILES) *
A* DESCRIPTION: THIS IS THE PHYSICAL FILE CUSMST. IT HAS *
A* ONE RECORD FORMAT CALLED CUSREC. *
A*****************************************************************
A* CUSTOMER MASTER FILE -- CUSMST
A R CUSREC
A CUST 5 0 TEXT('CUSTOMER NUMBER')
A NAME 20 TEXT('CUSTOMER NAME')
A ADDR1 20 TEXT('CUSTOMER ADDRESS')
A ADDR2 20 TEXT('CUSTOMER ADDRESS')
A CITY 20 TEXT('CUSTOMER CITY')
A STATE 2 TEXT('CUSTOMER STATE')
A ZIP 5 0 TEXT('CUSTOMER ZIP CODE')
A ARBAL 10 2 TEXT('ACCOUNTS RECEIVABLE BALANCE')
Figure 169. DDS for master database file CUSMST (physical file)
Main Menu Inquiry
The following illustrates a simple inquiry program using a WORKSTN file to display
menu choices and accept input.
MAINMENU: DDS for a Display Device File
The DDS for the MAINMENU display device file specifies file level entries and
describe one record format: HDRSCN. The file level entries define the screen size
(DSPSIZ), input defaults (CHGINPDFT), print key (PRINT), and a separate indicator
area (INDARA).
The HDRSCN record format contains the constant 'CUSTOMER MAIN INQUIRY',
which identifies the display. It also contains the keywords TIME and DATE, which
will display the current time and date on the screen. The CA keywords define the
function keys that can be used and associate the function keys with indicators in
the RPG program.
346 ILE RPG for AS/400 Programmer's Guide