AS/400 Integration: Technical Overview
Contents
The PC*Miler-AS/400 system uses distributed processing techniques, splitting processing between two environments. The user interface is written in RPG and runs on the AS/400, while small CL programs manage temporary data queues. The mileage calculation software is written in C++ and runs on a Windows PC.
The RPG programs communicate with the PC mileage calculation software through Client Access Express. The AS/400 interactive software 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
, waits for mileage requests, and processes them as received. While waiting, the PC can be used for other tasks such as PC*Miler graphics or RUMBA terminal emulation.
The program MIINQ
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.
For example, a truck or vehicle ID’s latitude/longitude, ZIP, or city name 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 to determine a graphical ETA. The data structures of these subroutines are described below.
The PC Mileage Server can respond to thirteen types of mileage and graphic requests:
Mileage
- VN: Version of PC*Miler Highway Data used by the server
- VA: Validation that a stop (City, ZIP code, etc.) is recognized by PC*Miler or a list of possible matches
- 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