IBM AS/400 manual Coding Considerations, General Considerations

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 69
Image 69
Coding Considerations

Coding Considerations

A*================================================================*

A* FILE NAME

: CUSTRPT

A* RELATED PGMS

: ARRSRPT

A* DESCRIPTIONS

: THIS IS THE PRINTER FILE CUSTRPT. IT HAS

A*

ONE RECORD FORMAT CALLED ARREARS.

A*================================================================*

AR ARREARS

A

 

 

 

2

6

 

A

 

 

 

 

'Customer number:'

A

RPTNUM

5

0

2

23

 

A

 

 

 

 

TEXT('CUSTOMER NUMBER')

A

RPTNAME

100A

 

3

10

 

A

 

 

 

 

TEXT('CUSTOMER NAME')

A

RPTADDR

100A

 

4

10

 

A

 

 

 

 

TEXT('CUSTOMER ADDRESS')

A

 

 

 

5

10'Amount outstanding:'

A

AMOUNT

10

2

5

35EDTWRD('

$0. ')

A

 

 

 

 

TEXT('AMOUNT OUTSTANDING')

A

 

 

 

5

50'Due date:'

 

A

DUEDATE

10

 

5

60

 

A

 

 

 

 

TEXT('DATE DUE')

 

 

 

 

 

 

 

Figure

25. DDS for CUSTRPT

 

 

 

 

 

Coding Considerations

This section presents some considerations that you should be aware o begin designing applications with multiple-procedure modules. The items grouped into the following categories:

¹General

¹Program Creation

¹Main Procedures

¹Subprocedures

General Considerations

¹

When

coding

a module with multiple procedures,

you

will

 

want

to

mak

 

/COPY files, primarily to contain any prototypes that your applicati

 

require. If you are creating a service

program,

you

will

need

 

service

program

and

the

prototypes,

if

any.

 

 

 

 

 

 

¹

Maintenance of

the

application means

ensuring

that each

 

component

is

 

most

 

current

level and that any changes do

not

affect

the

diffe

 

may

want

to

consider

using a tool such as

Application

Development

Ma

 

to

maintain

your

applications.

 

 

 

 

 

 

 

 

 

 

 

For

example,

suppose

that

another

programmer

makes a change to the

 

file that contains the prototypes.

When

you request

a

rebuild

o

 

tion, any module or program that

makes use

of the /COPY file will

 

piled automatically. You will find out quickly if the

changes to t

 

affect

the

 

calls

or

procedure

interfaces

in

your

application.

I

 

tion

 

errors,

 

you can then decide whether

to

accept

the

change

 

avoid

these

errors,

or

whether

to

change

the

call

interface.

 

Chapter 4. Creating an Application Using Multiple45 Procedures

Page 69
Image 69
IBM AS/400 manual Coding Considerations, General Considerations