DDM example 2: Remote server ORDERENT files

The ORDERENT program remains the same at all locations, but the CUSTMST2 file is now a copy of the central server's customer primary file CUSTMAST.

By using CUSTMST2 whenever possible for data that does not change often, the amount of communications time needed to process each order entry request can be minimized. The remote ORDERENT program reads the local CUSTMST2 file at the beginning of each order, and then, using DDM, updates the CUSTMAST file on the central server only when an order has been completed.

The other two files, INVEN and DETAIL, have the same functions on each remote server as on the central server.

Figure 1. Files used by remote ORDERENT programs
The files used by the ORDERENT programs are CUSTMAST, CUSTMST2, INVEN, and DETAIL.

The CUSTMAST file is changed by all locations and contains the most current information for each customer (for constantly changing data such as the customer's account balance). The CUSTMST2 file, which is used for reading data that changes only occasionally (such as name and address), should be changed periodically (once a week, for example), by recopying the CUSTMAST file into it. Task 2 of this example explains one way to do this.