Skip to main content
Omnitracs Knowledge Base

Create Default Vehicle - OMDFTVEH

Create Default Vehicle (OMDFTVEH) RI

Required Parameter Group:

1 Vehicle Identifier Input Char(10)
2 Vehicle Name Input Char(24)
3 Unified Address Input Char(10)
4 Return Status Output Char(1)
5 Reason Code Output Char(4)

API Overview:
The Create Default Vehicle API (OMDFTVEH) provides a reliable and easy to use mechanism for external applications to add new vehicles to the QTRACS Vehicle Database. This API is designed to be called from a batch environment. It has no interactive display components. Most of the fields in the new vehicle record will be defaulted from the system-wide default vehicle record. The only exceptions are those fields which must be specified as input parameters. Note: if the default vehicle is defined as a member of more than one vehicle message group, the vehicle being created must be of a type (ex: MCP or TMCT) that also supports multiple groups in order to inherit all of the groups. If it is not, the vehicle that is created will acquire only the first (alphabetical) group of those that are defined for the default vehicle.

Required Parameter Group Details:
(1) Vehicle Identifier
INPUT; CHAR(10)
This parameter must contain a unique vehicle identifier.

(2) Vehicle Name
INPUT; CHAR(24)
This parameter must contain a non-blank vehicle description.

(3) Unified Address
INPUT; CHAR(10)
This parameter must contain a unique unified address number.

(4) Return Status
OUTPUT; CHAR(1)
Status value returned to the caller will be set as follows:

0 Success
1 Failure, see reason code.
A Failure, API failed when called remotely

(5) Reason Code
OUTPUT; CHAR(4)
This parameter contains a reason code. Possible values returned include;

0000 OK
0011 Vehicle identifier or name is blank
0012 Vehicle identifier is reserved word 'NMC'
0013 Vehicle identifier may not begin with an asterisk
0014 Vehicle identifier contains illegal characters
0015 Vehicle identifier already exists
0021 Unified address is blank
0022 Unified address is reserved number 0009999999
0023 Unified address already exists
0024 Unified address is not within a valid range
0025 Unified address cannot be one of the reserved group message numbers
0026 Unified address contains illegal characters
0099 I/O error

Effect
Calling this API from some external application will result in the addition of a new QTRACS vehicle being added to OMEYVEHL. Most of its attributes will be the default values. If the system wide default vehicle record does not have a coverage identification and/or a position hardware type specified, this API will use 'DEADLETTER' as the coverage identifier and 'QASPR' as the position hardware type. Of course, this assumes that all validations were passed. The status and reason codes will be set and returned to the calling application. In addition, the appropriate transactions are sent to the NMC to define and initialize the vehicle.

  • Was this article helpful?