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*================================================================*
A R ARREARS
A 26
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 of before you
begin designing applications with multiple-procedure modules. The items are
grouped into the following categories:
General
Program Creation
Main Procedures
Subprocedures
General Considerations
When coding a module with multiple procedures, you will want to make use of
/COPY files, primarily to contain any prototypes that your application may
require. If you are creating a service program, you will need to provide both the
service program and the prototypes, if any.
Maintenance of the application means ensuring that each component is at the
most current level and that any changes do not affect the different pieces. You
may want to consider using a tool such as Application Development Manager
to maintain your applications.
For example, suppose that another programmer makes a change to the /COPY
file that contains the prototypes. When you request a rebuild of your applica-
tion, any module or program that makes use of the /COPY file will be recom-
piled automatically. You will find out quickly if the changes to the /COPY file
affect the calls or procedure interfaces in your application. If there are compila-
tion errors, you can then decide whether to accept the change to prototypes to
avoid these errors, or whether to change the call interface.
Chapter 4. Creating an Application Using Multiple Procedures 45