A R CSTINQ
A TEXT('DISPLAY CUST INFO')
A CA12(12 'PREVIOUS SCREEN')
A MODE 8A O 1 4DSPATR(HI)
A 1 13'MODE'
A DSPATR(HI)
A 2 4TIME
A DSPATR(HI)
A 2 28'CUSTOMER FILE MAINTENANCE'
A DSPATR(HI)
A DSPATR(RI)
A 2 70DATE
A EDTCDE(Y)
A DSPATR(HI)
A 4 14'Customer:'
A DSPATR(HI)
A DSPATR(UL)
A CUST R O 4 25DSPATR(HI)
A NAME R B 6 25DSPATR(CS)
A 04 DSPATR(PR)
A ADDR1 R B 7 25DSPATR(CS)
A 04 DSPATR(PR)
A ADDR2 R B 8 25DSPATR(CS)
A 04 DSPATR(PR)
A CITY R B 9 25DSPATR(CS)
A 04 DSPATR(PR)
A STATE R B 10 25DSPATR(CS)
A 04 DSPATR(PR)
A ZIP R B 10 40DSPATR(CS)
A EDTCDE(Z)
A 04 DSPATR(PR)
A 23 2'F12 Cancel'
A MODE1 8 O 23 13
A R CSTBLD TEXT('ADD CUST RECORD')
A CA12(12 'PREVIOUS SCREEN')
A MODE 8 O 1 4DSPATR(HI)
A 1 13'MODE' DSPATR(HI)
A 2 4TIME
A DSPATR(HI)
A 2 28'CUSTOMER FILE MAINTENANCE'
A DSPATR(HI RI)
A 2 70DATE
A EDTCDE(Y)
A DSPATR(HI)
A 4 14'Customer:' DSPATR(HI UL)
A CUST R O 4 25DSPATR(HI)
A 6 20'Name' DSPATR(HI)
A NAME R I 6 25
A 7 17'Address' DSPATR(HI)
A ADDR1 R I 7 25
A 8 17'Address' DSPATR(HI)
A ADDR2 R I 8 25
A 9 20'City' DSPATR(HI)
A CITY R I 9 25
A 10 19'State' DSPATR(HI)
A STATE R I 10 25
A 10 36'Zip' DSPATR(HI)
A ZIP R Y I 10 40
A 23 2'F12 Cancel Addition'
The DDS for the MNTMENU display device file contains three record formats: HDRSCN, CSTINQ, and CSTBLD. The HDRSCN record prompts for the customer number and the mode of processing. The CSTINQ record is used for the Update, Delete, and Display modes. The fields are defined as output/input (B in position 38). The fields are protected when Display or Delete mode is selected (DSPATR(PR)). The CSTBLD record provides only input fields (I in position 38) for a new record.
The HDRSCN record format contains the constant 'Customer File Maintenance'. The ERRMSG keyword defines the messages to be displayed if an error occurs. The CA keywords define the function keys that can be used and associate the function keys with indicators in the RPG program.