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.
Figure 197. DDS for display device file MAINMENU
A*****************************************************************
A* FILE NAME: MAINMENU *
A* RELATED PGMS: CUSMAIN *
A* DESCRIPTION: THIS IS THE DISPLAY FILE MAINMENU. IT HAS 1 *
A* RECORD FORMAT CALLED HDRSCN. *
A*****************************************************************
A DSPSIZ(24 80 *DS3)
A CHGINPDFT(CS)
A PRINT(QSYSPRT)
A INDARA
A R HDRSCN
A CA03(03 'END OF INQUIRY')
A CA05(05 'MAINTENANCE MODE')
A CA06(06 'SEARCH BY ZIP MODE')
A CA07(07 'SEARCH BY NAME MODE')
A 2 4TIME
A DSPATR(HI)
A 2 28'CUSTOMER MAIN INQUIRY'
A DSPATR(HI)
A DSPATR(RI)
A 2 70DATE
A EDTCDE(Y)
A DSPATR(HI)
A 6 5'Press one of the following'
A 6 32'PF keys.'
A 8 22'F3 End Job'
A 9 22'F5 Maintain Customer File'
A 10 22'F6 Search Customer by Zip Code'
A 11 22'F7 Search Customer by Name'
In addition to describing the constants, fields, line numbers,
and horizontal positions for the screen, the record formats also define
the display attributes for these entries.
Normally,
the field attributes are defined in a field-reference file rather
than in the DDS for a file. The attributes are shown on the DDS so
you can see what they are.