Get Vehicles Near Request - OMPRXVEH
Get Vehicles Near Request (OMPRXVEH)
Required Parameter Group:
1 | Latitude | Input | Packed(7,0) |
2 | Longitude | Input | Packed(7,0) |
3 | Distance Limit | Input | Packed(3,0) |
4 | Number of Finds Limit | Input | Packed(3,0) |
5 | Direction to Look | Input | Char(4) |
6 | Default Initial View | Input | Char(1) |
7 | Allow Selection from List | Input | Char(1) |
8 | Return Vehicle Identifier | Output | Char(10) |
9 | Return F-Key Pressed | Output | Char(2) |
10 | Return Status | Output | Char(1) |
API Overview:
The Get Vehicles Near Request API (OMPRXVEH) presents a display to the user that lists the results of a 'units near' proximity request. The results that are shown are a list of vehicles that are 'close to' some specified reference point. This program will select vehicles to be displayed to the user based on the input parameters received. This program will allow the user to scroll through the list of close vehicles in 'closest first' or alphabetic order.
In addition to viewing the list of 'units near', this API allows the user to execute several record-level options. You may display the detail about a selected vehicle, request its position history, send messages, or if allowed, you may select a vehicle and return its identifier to the calling application.
The parameter list that drives this API is obviously quite lengthy and could prove cumbersome depending on how this API is called. Therefore, another API exists that serves as a front end to this API that will present a display to the user and prompt for the required parameters. If this is desirable for your application, see the OMPRXQRY API for details.
Required Parameter Group Details:
(1) Latitude
INPUT; PACKED(7,0)
This parameter is the latitude portion of the reference point coordinate pair. This parameter must be given in signed seconds (not DDMMSS). This coordinate pair defines the geographic location from which the proximity search will begin.
(2) Longitude
INPUT; PACKED(7,0)
This parameter is the longitude portion of the reference point coordinate pair. This parameter must be given in signed seconds (not DDMMSS).
(3) Distance Limit
INPUT; PACKED(3,0)
This parameter limits the search to only those vehicles that are within the specified radius. This value, which must be between 1 and 500, will be interpreted as either miles or kilometers depending on the system configuration.
(4) Number of Finds Limit
INPUT; PACKED(3,0)
This parameter, which must be between 1 and 999, limits the search to a maximum number of vehicles.
(5) Direction to Look
INPUT; CHAR(4)
This parameter limits the search by controlling which geographic direction the system will check for close vehicles. Valid values are:
*ALL | All directions | E | East | NW | Northwest |
N | North | W | West | SE | Southeast |
S | South | NE | Northeast | SW | Southwest |
(6) Default Initial View
INPUT; CHAR(1)
This parameter controls the sort of the units near display. Valid values are:
C | Present in 'closest first' order |
A | Present in alphabetic order by vehicle identifier |
(7) Allow Selection from List
INPUT; PACKED(3,0)
This parameter controls the ability of the user to enter option 1 (=Select) against one of the vehicles in the list. Valid values are:
Y | Allow the user to select a vehicle from the list |
N | Do not allow the user to select a vehicle from the list |
(8) Return Vehicle Identifier
OUTPUT; CHAR(10)
This parameter returns the vehicle identifier if the user selected one of the displayed vehicles with option 1 (=Select). Otherwise, this field is set to blanks.
(9) Return F-Key Pressed
OUTPUT; CHAR(2)
This parameter indicates the function key pressed by the user that exited from the screen. It is set to '03' if F3 was pressed or '12' if F12 was pressed. Otherwise, this field is set to blanks.
(10) Return Status
OUTPUT; CHAR(1)
Status value returned to the caller will be set as follows:
0 | Success, proximity search executed and one or more vehicles were found |
1 | Success, proximity search executed but no vehicles were found |
2 | Failure, error in one of the passed parameters |
3 | Failure, undefined fatal error occurred |
Screenshot
Calling OMPRXVEH will present the following display.