Enqueue (ENQ)


Op Code (Hex) Operand 1 Operand 2 Operand 3
036B Queue Message prefix Message text
Operand 1: System pointer.

Operand 2: Character scalar.

Operand 3: Space pointer.

Bound program access

Built-in number for ENQ is 43. ENQ ( queue : address of system pointer message_prefix : address message_text : address )

Description

A message is enqueued according to the queue type attribute specified during the queue's creation.

If keyed sequence is specified, enqueued messages are sequenced in ascending binary collating order according to the key value. If a message to be enqueued has a key value equal to an existing enqueued key value, the message being added is enqueued following the existing message.

If the queue was defined with either last in, first out (LIFO) or first in, first out (FIFO) sequencing, then enqueued messages are ordered chronologically with the latest enqueued message being either first on the queue or last on the queue, respectively. A key can be provided and associated with messages enqueued in a LIFO or FIFO queue; however, the key does not establish a message's position in the queue. The key can contain pointers, but the pointers are not considered to be pointers when they are placed on the queue by an Enqueue instruction.

Operand 1 specifies the queue to which a message is to be enqueued. Operand 2 specifies the message prefix, and operand 3 specifies the message text.

The format of the message prefix is as follows:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Size of message to be enqueued
Bin(4)
4 4
Enqueue key value (ignored for FIFO/LIFO queues with key lengths equal to 0)
Char(key length)
* *
--- End ---

The size of message to be enqueued is supplied to inform the machine of the number of bytes in the space that are to be considered message text. The size of the message is then considered the lesser of the size of message to be enqueued attribute and the maximum message size specified on queue creation. The message text can contain pointers. When pointers are in message text, the operand 3 space pointer must be 16-byte aligned. Improper alignment will result in an exception being signaled.

If the enqueued message causes the number of messages to exceed the maximum number of messages attribute of the queue, one of the following occurs:

Limitations (Subject to Change)

The maximum allowable queue size, including all messages currently enqueued and the machine overhead, is 2 gigabytes.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

0A Authorization

10 Damage Encountered

1A Lock State

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

26 Process Management

2E Resource Control Limit

30 Journal

36 Space Management

44 Protection Violation