IBM AS/400 manual CUSMNT RPG Source, File Maintenance, Dspatrpr

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 376
Image 376

File Maintenance

Delete, and Display modes. The fields are defined as output/input (B 38). The fields are protected when Display or Delete mode is selecte

(DSPATR(PR)).

The CSTBLD record

provides

only

input fields

(I

in position

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

The CA keywords define the function

keys

that can be used and assoc

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

Page 376
Image 376
IBM AS/400 manual CUSMNT RPG Source, File Maintenance, Dspatrpr