Skip to main content
Omnitracs Knowledge Base

Create Monitor Landmark Export File for QMI - OMQMIPLC

Create/Monitor Landmark Export File for QMI (OMQMIPLC) RI

Required Parameter Group:

1 Function Code Input Char(1)
2 Export File Name Output Char(20)
3 Record Count Output Packed(11,0)
4 Return Status Output Char(1)

API Overview:
The Create/Monitor Landmark Export File for QMI API (OMQMIPLC) is used to provide a means for the QMI application to request the creation of a "flat file" of custom landmarks that is suitable for downloading and importing into the QMI application on the PC. It is important to understand that this API will not block while the export file is being created, rather it will return control to the caller after the creation request has been placed. Thereafter, the caller may re-call this API with another function code to determine the status of the 'creation request'. When this API reports that the file has been successfully created, the QMI application may then transfer the file (via FTP) to a local directory of its choice.

Both the form and content of the export file (OMQMIEXP) is specific to the needs of the QMI application. The export file will include a record for every QTRACS Place that is not of type CITY or TOWN, i.e. every custom landmark. The format of each record is shown below.

Required Parameter Group Details:
(1) Function Code
INPUT; CHAR(1)
This parameter is a function code that instructs the API what action to perform. Valid values are:

C Create the export file
M Monitor and report the status of a previous creation request
A Abort any current export file creation attempt and delete the export file
D Delete the export file

(2) Export File Name
OUTPUT; CHAR(20)
This parameter returns the name of the export file and the library where it may be found. The library name is returned in the first 10 bytes of the parameter and the export file name is found in bytes 11 through 20.

This field is always returned regardless of the function code specified.

(3) Record Count
OUTPUT; PACKED(11,0)
This parameter returns different results depending on the function code parameter. Refer to the following table.

Function Code Expected Record Count
C Total number of records expected to be written to the export file
M Total number of records actually in the file
A 0
D 0

(4) Return Status
OUTPUT; CHAR(1)
Status value returned to the caller yields different results depending on the function code parameter. Refer to the following table.

Function Code Return Status Status Description
C 0 Success, export file will be created
1 Failure, export file cannot be created
M 0 Success, export file has been created and is ready for download
1 Failure, export file is not ready for download; check again later
2 Failure, no export file is found and no job is running to create one
A 0 Success, export file creation aborted or none found to be aborted
1 Failure, export file creation could not be aborted
D 0 Success, export file was deleted or none could be found
1 Failure, export file found but could not be deleted
Any A Failure, API failed when called remotely

Export File Format

1-25 Custom Place Name Char(25)
26-50 City Name Char(25)
51-60 2-Character State / Province Abbreviation Char(10)
61-85 County Name Char(25)
86-94 Postal (Zip) Code Char(9)
95-104 2-Character Country Code Char(10)
105-129 5-Character QTRACS Place Type Char(25)
130-140 Latitude (in decimal degrees) Zoned(11,6)
141-151 Longitude (in decimal degrees) Zoned(11,6)
152-157 Local Time Zone Offset from GMT Zoned(6,2)
158-158 Observes Daylight Savings Time?(Y=yes, N=no) Char(1)
159-159 Use for Proximity?(always set to Y) Char(1)
160-413 Street Address Char(254)
414-443 Contact Information(always set to blanks) Char(30)
444-473 Phone number
** OBSOLETE **
Char(30)

The export file will be further characterized by the following:

  1. Character type fields will be enclosed by double quotes.
  2. Commas will be used to separate each field.
  3. The file will be created in EBCDIC format on the AS/400.
  4. When the file is transferred to the PC, FTP will be responsible for converting the data from EBCDIC to ASCII format. In addition, FTP adds the appropriate LF/CR character to the end of each record.
  • Was this article helpful?