IBM AS/400 Manuel D’Utilisation

Page de 489
 
 
Example of Module with Multiple Procedures
 
The Entire ARRSRPT Program
The ARRSRPT program consists of two modules: ARRSRPT and CVTPROCS.
Figure 21 shows the different pieces of our mini-application.
Main Procedure
NumToChar
CUSTRPT
DDS
CUSTFILE
DDS
/COPY member
CVTPROCP
NOMAIN
InArrears
FmtCust
ARRSRPT *MODULE
ARRSRPT *PGM
CVTPROCS *MODULE
Figure  21.  The ARRSRPT Application
Figure 22 shows the source for the entire ARRSRPT module.
 
*=================================================================*
* Source for module ARRSRPT.
Contains a main procedure and
* two subprocedures: InArrears and FmtCust.
 
*
* Related Module:
CVTPROCS
(NumToChar called by FmtCust)
 
*=================================================================*
 
*--------------------------------------------------------------*
* F I L E S
 
*
* CUSTFILE - contains customer information
* CUSTRPT
- printer file (using format ARREARS)
 
*--------------------------------------------------------------*
 
FCUSTFILE
IP
E
DISK
 
FCUSTRPT
O
E
PRINTER
Figure  22  (Part  1  of  3).  ILE RPG Complete Source for ARRSRPT Module
   
Chapter 4. Creating an Application Using Multiple Procedures
41