Skip to main content
Omnitracs Knowledge Base

Get Trailers Near Request - TTPRXTRL

Get Trailers Near Request (TTPRXTRL)

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 Trailer Identifier Output Char(10)
9 Return F-Key Pressed Output Char(2)
10 Return Status Output Char(1)

API Overview:
The Get Trailers Near Request API (TTPRXTRL) presents a display to the user that lists the results of a 'trailers near' proximity request. The results that are shown are a list of trailers that are 'close to' some specified reference point. This program will select trailers 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 trailers in 'closest first' or alphabetic order.

In addition to viewing the list of 'trailers near', this API allows the user to execute several record-level options. You may display the detail about a selected trailer, or if allowed, you may select a trailer 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 him 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 trailers 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 trailers.

(5) Direction to Look
INPUT; CHAR(4)
This parameter limits the search by controlling which geographic direction the system will check for close trailers. 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 trailer 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 trailers in the list. Valid values are:

Y Allow the user to select a trailer from the list
N Do not allow the user to select a trailer from the list

(8) Return Trailer Identifier
OUTPUT; CHAR(10)
This parameter returns the trailer identifier if the user selected one of the displayed trailers 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 trailers were found
1 Success, proximity search executed but no trailers were found
2 Failure, error in one the passed parameters
3 Failure, undefined fatal error occurred

Screenshot
Calling TTPRXTRL will present the following display.
api_2.5.15_screenshot.png

  • Was this article helpful?