IBM manual File Maintenance, ILE RPG for AS/400 Programmers Guide, Set Maintenance Mode

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 378
Image 378

File Maintenance

********************************************************************

*

SUBROUTINE - DELSUB

 

 

 

*

*

PURPOSE

- DELETE CUSTOMER MASTER RECORD

*

********************************************************************

C

DELSUB

BEGSR

 

 

 

 

C

 

MOVE

*ON

 

*IN04

 

C

CSTKEY

CHAIN

CMLREC1

 

 

52

C

 

IF

NOT *IN52

 

 

 

C

 

EXFMT

CSTINQ

 

 

 

C

 

IF

NOT *IN12

 

 

 

C

 

DELETE

CMLREC1

 

 

 

C

 

ELSE

 

 

 

 

C

 

UNLOCK

CUSMSTL1

 

 

 

C

 

ENDIF

 

 

 

 

C

 

ENDIF

 

 

 

 

C

 

ENDSR

 

 

 

 

********************************************************************

*

SUBROUTINE - INQSUB

 

 

 

*

*

PURPOSE

- DISPLAY CUSTOMER MASTER RECORD

*

********************************************************************

C

INQSUB

BEGSR

 

 

 

 

C

 

MOVE

*ON

 

*IN04

 

C

CSTKEY

CHAIN

CMLREC1

 

 

52

C

 

IF

NOT *IN52

 

 

 

C

 

EXFMT

CSTINQ

 

 

 

C

 

UNLOCK

CUSMSTL1

 

 

 

C

 

ENDIF

 

 

 

 

C

 

ENDSR

 

 

 

 

********************************************************************

*

SUBROUTINE - SETMOD

 

 

 

*

*

PURPOSE

- SET MAINTENANCE MODE

 

 

*

********************************************************************

C

SETMOD

BEGSR

 

 

 

 

C

 

SELECT

 

 

 

 

C

 

WHEN

*IN05

 

 

 

C

 

MOVE

'ADD

'

MODE

 

C

 

WHEN

*IN06

 

 

 

C

 

MOVE

'UPDATE

'

MODE

 

C

 

WHEN

*IN07

 

 

 

C

 

MOVE

'DELETE

'

MODE

 

C

 

WHEN

*IN08

 

 

 

C

 

MOVE

'DISPLAY '

MODE

 

C

 

ENDSL

 

 

 

 

C*

 

 

 

 

 

 

C

 

MOVE

MODE

 

MODE1

 

C

 

ENDSR

 

 

 

 

 

 

 

 

 

Figure 175

(Part

3 of 3).

Source for module CUSMNT

 

This program maintains a customer master file for additions, changes, and deletions. The program can also be used for inquiry.

The program first sets the default (display) mode of processing and customer maintenance prompt screen. The workstation user can press F3, wh turns on indicator 03, to request end of job. Otherwise, to work with mation, the user enters a customer number and presses Enter. The user

354 ILE RPG for AS/400 Programmer's Guide

Page 378
Image 378
IBM manual File Maintenance, ILE RPG for AS/400 Programmers Guide, Set Maintenance Mode