gtps2m3j | ACF/SNA Data Communications Reference |
The Queue Manager package is a basic set of tools to perform queueing functions. The primitives provided by this package are:
The control block used for queue management is called a Queue Control
Element (QCE). This block is created and maintained by the user.
When interfacing with the Queue Manager, the QCE must reside in main
storage and must have a protect key of working storage. The user
must have exclusive control over the QCE when requesting queueing
services. As illustrated in Table 20, the user must adhere to the layout of a QCE.
Table 20. Queue Control Element Layout
Field Label | Displacement | Byte | Bit | Comments |
---|---|---|---|---|
IQCEFOQ | 0 | 4 |
| First of Queue |
IQCELOQ | 4 | 4 |
| Last of Queue |
IQCESCUR | 8 | 4 |
| Start of Current Message |
IQCECUR | 12 | 4 |
| Current Block |
IQCEOFF | 16 | 2 |
| Next Available Byte for GET N |
IQCEPARM | 18 | 16 |
| User Parameter Area |
Data messages queued off a QCE must be in the standard AMSG format. The message text should be queued in a device-independent format to facilitate potential queue swing operations. That is, reformatting of the data should occur after the message has been dequeued. The message block size can be of 381, 1055, or 4K type. The maximum amount of text that can fit within a 381 byte block is 342, within a 1055 byte block is 1016, and within a 4K byte block is 4027.
When queueing a message that consists of multiple blocks, the prime block should be in main storage and the remaining blocks should be file chained, using the AMSG chaining scheme. The AM0BCH field is reserved for system usage. All chained blocks within the same message must be of the same size.
When retrieving a message the user has the following options: