Add a QTRACS Place - OMADDPLC
Add a QTRACS Place (OMADDPLC) RI
Required Parameter Group:
1 | Format Name | Input | Char(6) |
2 | Place Data Structure | Input | Char(512) |
3 | Place Identifier | Output | Packed(7,0) |
4 | Return Status | Output | Char(1) |
5 | Reason Code | Output | Char(4) |
API Overview:
The Add a QTRACS Place API (OMADDPLC) is used to add a place to the QTRACS Place database. Upon successful validation, the API will update the place file and return the newly associated 'place id' to the calling application program. This API provides a reliable and easy to use mechanism for external applications to add places to the QTRACS database.
In addition, a stub program that calls the OMADDPLC API is also delivered. This site-specific stub, OMIMPPLC, allows the user to import many places from a custom source. This stub may be found in the deliverable source library (OMNIDLVSRC).
Required Parameter Group Details:
(1) Format Name
INPUT; CHAR(6)
The format of the information being given. Valid values are:
PLC010 | Place record with no ETA data |
PLC020 | Place record with ETA data included |
(2) Place Data Structure
INPUT; CHAR(512)
This parameter is a fixed format data structure that contains place information used to fill a QTRACS place record.
PLC010 Data Format (Place record with no ETA data)
1-4 | Latitude (signed seconds) | Packed(7,0) |
5-8 | Longitude (signed seconds) | Packed(7,0) |
9-13 | Place Type | Char(5) |
14-38 | Place Name | Char(25) |
39-63 | Address Line #1 | Char(25) |
64-88 | Address Line #2 | Char(25) |
89-113 | City Name (mixed case) | Char(25) |
114-115 | State/Province Abbreviation | Char(2) |
116-117 | Country Abbreviation | Char(2) |
118-126 | Postal Code | Char(9) |
127-135 | SPL Code | Char(9) |
136-138 | Size (radius in mls/kms) | Packed(5,1) |
139-144 | Phone number |
Packed(11,0) |
145-147 | Time Zone Code | Char(3) |
148-148 | Allow Daylight Savings (Y/N) | Char(1) |
149-158 | Alias, Cross Reference to Customer File | Char(10) |
159-159 | Customer Location Attribute (Y/N) | Char(1) |
160-160 | Unloading Location Attribute (Y/N) | Char(1) |
161-161 | Loading Location Attribute (Y/N) | Char(1) |
162-162 | Trailer Drop Location Attribute (Y/N) | Char(1) |
163-163 | Intermodal Point Attribute (Y/N) | Char(1) |
164-164 | User-Defined Attribute #1 | Char(1) |
165-165 | User-Defined Attribute #2 | Char(1) |
166-166 | User-Defined Attribute #3 | Char(1) |
167-167 | User-Defined Attribute #4 | Char(1) |
168-168 | User-Defined Attribute #5 | Char(1) |
169-169 | Refine Coordinates (Y/N) | Char(1) |
170-194 | Milemaker Name | Char(25) |
195-219 | Milemaker County | Char(25) |
220-228 | Milemaker SPL Code | Char(9) |
PLC020 Data Format (Place record with ETA data included)
1-228 | PLC010 Data Format (see above) | * |
229-231 | Peak Traffic Base AM Time (HHMM) | Packed(5,0) |
232-233 | Peak Traffic Duration AM (min) | Packed(3,0) |
234-236 | Peak Traffic Base PM Time (HHMM) | Packed(5,0) |
237-238 | Peak Traffic Duration PM (minutes) | Packed(3,0) |
239-240 | Local Distance (mls/kms) | Packed(3,0) |
241-242 | Local Average Speed in Traffic (MPH/KPH) | Packed(3,0) |
243-244 | Local Average Speed Non-Traffic (MPH/KPH) | Packed(3,0) |
245-246 | Average Wait Time to Dock (min) | Packed(3,0) |
247-248 | Average Wait Time to Depart (min) | Packed(3,0) |
249-250 | Average Detention Time to Dock (min) | Packed(3,0) |
251-252 | Average Detention Time to Depart (min) | Packed(3,0) |
(3) Place Identifier
OUTPUT; PACKED(7,0)
This parameter contains the place identifier associated to the newly created place record.
(4) Return Status
OUTPUT; CHAR(1)
Status value returned to the caller will be set as follows:
0 | Success, place record has been written |
1 | Success, place and ETA record have been written |
2 | Failure, place data structure given does not correspond to one of the above types |
3 | Failure, invalid value in place data structure |
A | Failure, API failed when called remotely |
(5) Reason Code
OUTPUT; CHAR(4)
This parameter contains a reason code when the return status parameter is equal to '3'. Possible values returned include;
0001 | Invalid data block requested (other than "PLC010" or "PLC020") |
0002 | Place name, city name, state, country, postal code, or place type was left blank. |
0003 | Invalid country or state entered. |
0004 | Radius given is out of valid range (0-50) |
0005 | Place Type is invalid. |
0006 | Time Zone is invalid. |
0007 | Yes/No flag is not set to "Y" or "N" for one of the following: |
0008 | AM Peak Traffic Base Time invalid |
0009 | AM Peak Traffic Duration is out of valid range (0-240) |
0010 | PM Peak Traffic Base Time invalid |
0011 | PM Peak Traffic Duration is out of valid range (0-240) |
0012 | Local Distance is out of valid range (0-999) |
0013 | Local Average Traffic Speed is out of valid range (0-999) |
0014 | Local Average Non-Traffic Speed is out of valid range (0-999) |
0015 | Average Wait to Dock is out of valid range (0-999) |
0016 | Average Wait to Depart is out of valid range (0-999) |
0017 | Average Detention Time to Dock is out of valid range (0-999) |
0018 | Average Detention Time to Depart is out of valid range (0-999) |
0019 | One of the following is true: o Latitude/Longitude is invalid o Place denoted by latitude/longitude already exists o Place denoted by latitude/longitude overlaps another defined place. |
0020 | Place denoted by country/state/name is not unique (already exists). |