Skip to main content
Omnitracs Knowledge Base

Receive File Queue - OMRCVFIL

Receive File Queue (OMRCVFIL)

Required Parameter Group:

1 File Name Input Char(10)
2 Library Name Input Char(10)
3 Length of Data Output Packed(5,0)
4 Data Output Char(5000)
5 Wait Time Input Packed(5,0)

Optional Parameter Group:

6 Return Status Output Char(1)
7 Reason Code Output Char(4)

API Overview:
The Receive File Queue (OMRCVFIL) API receives data from the specified physical file. The file acts as a FIFO queue (mimicking a data queue) which buffers all transactions between QTRACS and an external application.

The physical file whose data is being received must be in a format dictated by QTRACS/400. Therefore, it is recommended that the file be created using the External Application Detail screen. This will create the file with the correct field types and lengths. QTRACS will then feed EAL transactions to the file and the EAL process may use this API to retrieve its data.

Required Parameter Group Details:
(1) File Name
INPUT; CHAR(10)
The name of the file to receive the data from.

(2) Library Name
INPUT; CHAR(10)
The name of the library where the file resides. Valid values are:

Library Name Explicit library name containing the file
*LIBL The library list
*CURLIB The job's current library

(3) Length of Data
OUTPUT; PACKED(5,0)
The number of characters received from the file. If a time out occurs and no data is received from the file, this field is set to zero.

(4) Data
OUTPUT; CHAR(5000)
This field contains the data received from the file.

(5) Wait Time
INPUT; PACKED(5,0)
The amount of time to wait if no entries exist in the file. When no entries are in the file, the wait time parameter (in seconds) specifies the following:

< 0 Waits forever
0 Continue processing immediately. If no entry exists, the call completes immediately with the length of data parameter set to zero.
> 0 The number of seconds to wait. The maximum is 99999 which allows a wait time of approximately 28 hours.

Optional Parameter Group Details:
(6) Return Status
OUTPUT; CHAR(1)
Status value returned to the caller will be set as follows:

0 Success
1 Failure

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

0000 No transaction at this time
0001 Transaction found and returned
0010 Specified file in library does not exist
0011 Cannot open specified file in library
0012 Cannot delete transaction from file
  • Was this article helpful?