AS/400 Tolls Integration: Technical Overview
Contents
The PC*Miler-AS/400 system uses distributed processing techniques, splitting processing between two environments:
- The user interface and interactive software are written in RPG and run on the AS/400.
- Small CL programs create and remove temporary data queues (output or response queues).
- The mileage calculation software is written in C++ and runs on a PC in the Windows environment.
The RPG programs communicate with the PC mileage calculation software through Client Access Express. The interactive software on the AS/400 allows multiple users to look up point-to-point mileage and routes for up to thirty stop-off points. The Windows server application creates a data queue on the AS/400 at startup called MIDQUE
. The server application waits for mileage requests and processes them when received. While the server application is waiting for work, the PC can be used for other tasks such as PC*Miler graphics or RUMBA terminal emulation.
The program TOLLINQ contains two subroutines for integrating miles with other transportation software:
SNDREQ
: Sends mileage requests to PC*Miler.RSLT
: Receives mileage results from PC*Miler.PLOT
: Sends graphics requests for ETA truck display of graphics.
For example, a truck or vehicle ID’s Lat/Long, ZIP, or city name position can be sent to the PC using PLOT
and the “DT” request. Then a “DR” request with the truck’s origin and destination can be sent so that a graphical ETA can be determined. The data structures of these subroutines are described below.
The PC Mileage Server can respond to a total of thirteen types of mileage and graphic requests:
Mileage
- VN: Version of PC*Miler Highway Data being used by the server
- VA: Validation that a stop (City, ZIP code, etc.) is recognized by PC*Miler or a list of possible matches to a partial city or ZIP code
- MI: Total mileage for up to 30 stops
- SM: Total mileage for up to 30 stops broken down by state or province
- HS: Turn-by-turn driving instructions for up to 30 stops
- LL: Returns the lat/long coordinates for a city or address (PC*Miler|Streets only)
Graphics
- DR: Draw Route for up to 30 Stops
- DT: Draw up to 30 truck bitmaps or “push pins” on the map
- CT: Clear Truck bitmap from a specified location
- CR: Clear a drawn route line
- CA: Clear all routes and trucks
- PR: Print route
- PA: Print all
The PC Mileage Server responds with the following types of returns
- VR: Version of PC*Miler or PC*Miler|Streets running on the PC
- PL: Good/Bad Stop or a ‘pick list’ of potential matches
- CP: Total Miles for a trip
- SR: Total Miles for a trip broken down by state or province
- HR: Turn-by-turn driving instructions or “highway segments”
- VN: returns a VR
- VA: returns a PL
- MI: returns a CP
- SM: returns a CP and an SR
- HS: returns a CP, an SR, and an HR
- LL: returns an LR