IBM AS/400 manual for Processing Disk Files, Enum

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 321
Image 321

 

 

 

 

Methods

for Processing Disk Files

 

 

 

 

 

 

 

 

OPRINT

H

1P

 

2

6

 

 

O

 

 

 

 

 

40

'EMPLOYEE WEEKLY WORKING '

O

 

 

 

 

 

52

'HOURS REPORT'

O

H

01

 

1

 

 

 

O

 

 

 

 

 

12

'EMPLOYEE: '

O

 

 

ENAME

 

 

32

 

O

H

01

 

1

 

 

 

O

 

 

 

 

 

12

'SERIAL #: '

O

 

 

ENUM

 

 

17

 

O

 

 

 

 

 

27

'DEPT: '

O

 

 

EDEPT

 

 

30

 

O

 

 

 

 

 

40

'TYPE: '

O

 

 

ETYPE

 

 

41

 

O

H

01

 

1

 

 

 

O

 

 

 

 

 

20

'WEEK #'

O

 

 

 

 

 

50

'HOURS WORKED'

O

D

12

 

1

 

 

 

O

 

 

WEEKNO

 

 

18

 

O

 

 

EHWRK

3

 

45

 

 

 

 

 

 

Figure 148

(Part

2

of 2).

Sequential-by-Key Processing, Example 2

EXAMPLE PROGRAM

3

(Matching-Record Technique):

In

this

example,

the

 

TRWEEK file is defined as a secondary input

file.

The

EMPREC

and

RCWEEK

records

are

processed as

matching records,

with

the

ENUM

field

in

assigned the match level value of M1. Record-identifying indicators 01 assigned to the records to control the processing for the differen

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

*

PROGRAM NAME:

YTDRPT5

 

*

* RELATED FILES:

EMPMST

(Physical File)

 

*

*

 

 

 

TRWEEK

(Physical File)

 

*

*

 

 

 

PRINT

(Printer File)

 

*

*

DESCRIPTION:

This program shows an example of processing

*

*

 

 

 

records using the matching record method.

*

*

 

 

 

This program prints out each employee's

 

*

*

 

 

 

information, weekly worked hours and amount

*

*

 

 

 

of overtime.

 

*

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

FPRINT

O

F

80

PRINTER

 

 

FEMPMST

IP

E

 

K DISK

 

 

FTRWEEK

IS

E

 

K DISK

 

 

IEMPREC

 

01

 

 

 

 

I

 

 

 

 

ENUM

M1

 

IRCWEEK

 

02

 

 

 

 

I

 

 

 

 

ENUM

M1

 

 

 

 

 

 

 

Figure

149

(Part

1

of

2). Sequential-by-Key Processing, Example 3

Chapter 16. Accessing Database 297Files

Page 321
Image 321
IBM AS/400 manual for Processing Disk Files, Enum