Queue Manager Manual

ENQ (UOW Code 502)
Queue Manager Server Interface
2–16 46517 Tandem Computers Incorporated
CPU-PIN
This is the CPU PIN of the Entry Manager that makes the queue entry. This value is
used to ensure that entries on the queue are unique.
ENQ Operation ENQ adds an entry to the named queue. The application making the entry should end
its transaction as soon as possible after adding the entry. This minimizes conflict when
available queue entries exist in the file but are inaccessible because they are locked by
TMF. If a queue entry remains locked, an available server could issue a DEQ, fail, and
go back to waiting. The Wait Manager, however, is not notified that the lock has been
removed, forcing the potential server to wait until the next entry for QUEUE-NAME is
made.
Besides issuing an END TRANSACTION as soon as possible after the ENQ, you have
a couple of other options for ensuring that entries are not left unattended in the Queue:
If a server is triggered by Wait Manager to retrieve an entry and finds none, the
server should delay slightly before issuing another WAITQ.
A WAITQ can tell the Wait Manager to trigger the server after a specified timeout,
for example, 15 minutes.
The ordering for queue entries with the same queue name and priority is based on a
combination of the current system timestamp and the CPU PIN of the Entry Manager.
These generated values are returned in the response.