Enscribe Programmer's Guide
This behavior affects the operation of the FILE_GETINFOLIST_ and FILERECINFO operations. The
FILE_GETINFOLIST_ procedure does not return a meaningful current key value after a
FILE_WRITE64_, WRITE[X], FILE_READUPDATELOCK64_ or READUPDATELOCK[X] operation. It
can, however, return a current key value after a FILE_READ64_/READ[X] operation. The
FILERECINFO procedure does not return the current key value for queue files.
Specifying Timeout Periods
To specify a timeout period for read operations on queue files, use SETMODE function 128.
Otherwise, a default timeout period of 60 seconds applies. The purpose of the timeout period is
to limit the time spent on dequeue operations, especially for audited files. If the read operation is
not completed within the timeout period, an error 162 (operation timed out) is returned.
The parameters for the SETMODE functions 128 are:
param1
The high-order word of the timeout value (in units of one hundredth of a second).
param2
The low-order word of the timeout value (in units of one hundredth of a second).
The two words are combined to form a 32-bit integer for the timeout value. These values are
reserved:
-2D
Default timeout period (60 seconds).
-1D
Infinite timeout period (timeout error is not returned.)
0D
No timeout period (error is returned immediately if record cannot be read.)
NOTE: Do not use the timeout option of AWAITIO[X]/FILE_AWAITIO64_ to complete a
READUPDATELOCK[X]/FILE_READUPDATELOCK64_ operation. The cancellation that occurs after
the timeout expires hides the fact that a record may have been dequeued from the file.
Locking a Record
To lock a record, perform a READLOCK[X]/FILE_READLOCK64_ operation. For audited files, any
records associated with an uncommitted transaction are also considered locked.
Network Considerations
You cannot access a queue file from a system running an operating system prior to D20.
Performance Considerations
Although multiple servers (dequeuing processes) can be used on a Queue File, there are practical
limits on how many processes should be used. Each time a transaction completes (for audited
Queue Files) or record is inserted (for non-audited Queue Files), the Disk Process will re-execute
each FILE_READUPDATELOCK64_/READUPDATELOCK operation which is waiting for a new
record. When there are many FILE_READUPDATELOCK64_/READUPDATELOCK operations waiting,
the overhead to perform this action can become excessive, and reduce the throughput on the
Queue File and/or affect applications sharing the CPU with the primary Disk Process. The amount
of impact is a factor on the number of read processes waiting at a given time, and the speed of
the CPU.
As a general guideline, do not use more than a few dozen dequeueing processes. Although
supported, having more than 100 processes for a Queue File can had adverse affects on a system.
As an alternative, consider using multiple queue files.
Accessing Queue Files 117