IBM AS/400 Frozen Dessert Maker User Manual


 
File Maintenance
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.
CUSMNT: RPG Source
*****************************************************************
* PROGRAM NAME: CUSMNT *
* RELATED FILES: CUSMSTL1 (LF) *
* MNTMENU (DSPF) *
* DESCRIPTION: THIS PROGRAM SHOWS A CUSTOMER MASTER *
* MAINTENANCE PROGRAM USING A WORKSTN FILE. *
* THIS PROGRAM ALLOWS THE USER TO ADD, UPDATE, *
* DELETE AND DISPLAY CUSTOMER RECORDS. *
* PF3 IS USED TO QUIT THE PROGRAM. *
*****************************************************************
FCUSMSTL1 UF A E K DISK
FMNTMENU CF E WORKSTN
C CSTKEY KLIST
C KFLD CUST
********************************************************************
* MAINLINE *
********************************************************************
C MOVE 'DISPLAY ' MODE
C EXFMT HDRSCN
C*
C DOW NOT *IN03
C EXSR SETMOD
C*
C CUST IFNE *ZERO
C MODE CASEQ 'ADD' ADDSUB
C MODE CASEQ 'UPDATE' UPDSUB
C MODE CASEQ 'DELETE' DELSUB
C MODE CASEQ 'DISPLAY' INQSUB
C ENDCS
C ENDIF
C*
C EXFMT HDRSCN
C ENDDO
C MOVE *ON *INLR
Figure 175 (Part 1 of 3). Source for module CUSMNT
352 ILE RPG for AS/400 Programmer's Guide