gtps2m3k | ACF/SNA Data Communications Reference |
The Queue Manager parameter list, IQPRM (Table 21), is used for both input and output when interfacing with the Queue Manager. The user must provide this parameter list, load its address in register one (R1), and enter (ENTRC) segment CMX0 when issuing a queueing request. After completing the user-requested service, the Queue Manager returns the parameter list and sets indicators to identify successful or unsuccessful queue management results.
Table 21. Queue Manager Parameter List
Field Label | Displacement | Byte | Value | Comments |
---|---|---|---|---|
IQPRFUNC | 0 | 1 |
X'00' X'01' X'02' X'03' X'04' X'05' |
ENQUEUE GET Message GET N Bytes DEQUEUE Message WASH PURGE All |
IQPRINDC | 1 | 1 |
X'80' |
Release File |
IQPRGENR | 2 | 1 |
X'00' X'01' X'02' |
Successful Completion Unsuccessful Completion Parameter List Error |
IQPRDETL | 3 | 1 |
X'01' X'02' X'03' X'04' X'05' X'06' X'07' X'08' X'09' X'0A' X'0B' X'0C' X'0D' X'0E' |
End of Message Queue Empty I/O Error No Message Available for Wash GET Message Function Not Valid or Not Performed Consecutive GETs Issued DEQUEUE Function Not Valid Function Not Supported GET N Byte Function Not Valid Invalid Target Offset for GET Invalid Record ID No Block Attached On D0 Invalid QCE Address Invalid Block Attached On D0 or Can't Queue the Message |
IQPRQCE | 4 | 4 |
| QCE core address |
IQPRRET | 8 | 2 |
| Number of bytes for GET N Bytes |
IQPROFF | 10 | 2 |
| Target offset for GET N Bytes |
IQPRID | 12 | 2 |
| 2-character record ID |
IQPRPARM | 14 | 16 |
| User parameter area |
The Queue Manager Input Interface is detailed in Table 22.
Table 22. Queue Manager Input Interface
Registers | ECB Workarea | ECB Data Levels |
---|---|---|
R1 : Parameter List Addr - IQPRM |
EBW - Irrelevant EBX - Irrelevant Protect Key of Working Storage |
|
For all queueing services, the QCE core address must be present in the parameter list. The user is responsible for initializing the QCE only before the first queueing request.
The user must include within the parameter list the record ID that the Queue Manager should use. Prime record attributes are used by the Queue Manager on the specified record ID. The user may also include within the parameter list a 16-byte parameter area. This area is saved by the Queue Manager and returned to the user in the QCE when the message is dequeued.
The prime block on level D0, provided by the user, is released by the Queue Manager.
Upon issuing the Get Message request, the user must include within the parameter list the record ID that the Queue Manager should use.
The user may also specify a target offset (M bytes), within the parameter list. M indicates that the Queue Manager should start filling the target block on level zero (D0) M bytes after the 18th byte of the block. If M is equal to zero, the Queue Manager fills the target block starting at location 18.
The Queue Manager does not impose any values within the first 18 bytes of the returned block.
Upon return, the Queue Manager places the actual number of bytes returned in the IQPRRET field of the input parameter list.
The user must include within the input parameter list the record ID that the Queue Manager should use.
If the Get N Bytes function has been used to retrieve a message, the Get Message function cannot be used for retrieving any remaining bytes of the same message. The "End of Message" return code indicates that the message has been fully dequeued.
The Dequeue function must be specified between two consecutive "Get" operations.
The Queue Manager Output Interface is detailed in Table 23.
Table 23. Queue Manager Output Interface
Registers | ECB Workarea | ECB Data Levels |
---|---|---|
|
EBW - Unchanged EBX - Unchanged Protect Key of Working Storage |
|
The input/output parameter list is returned to the user upon completion of every queue service request. The Queue Manager also sets two types of indicators (general and detailed) to communicate the actions taken (or attempted) by the Queue Manager to the user as detailed in General Return Codes and Detailed Return Codes.
The general indicator returns one of these results:
A parameter in the user supplied parameter list is in error. The detailed indicator byte must be examined for one of the following indications:
The End of Message return code is related to the Get N Bytes function. When the last part of the message is returned, the Queue Manager posts successful completion in the general indicator and end of message in the detailed indicator.
The Queue Empty return code is posted in the detailed indicator byte when the Queue Manager attempts to get a message from an empty QCE.
The I/O Error return code is posted in the detailed indicator byte when an I/O error has been detected during manipulation of file records.
The No Messages Available for Wash return code is posted in the detailed indicator byte when the Wash function is requested and the file address of the previously returned message is not present in the QCE.
The Get Message Function Not Valid return code is posted in the detailed indicator byte when the user requested to retrieve a message via Get N Bytes, and before receiving the end of message indicator the user requested further dequeueing via Get Message.
The Dequeue Function Not Specified return code is posted in the detailed indicator byte when the user requested two consecutive Get operations without issuing a Dequeue operation in between.
The core block that corresponds to the record ID that the user specified is not large enough to fit the prime block of the message being enqueued.
The user has requested a function that is not supported by the Queue Manager.
The Invalid Number of Bytes for Get return code is posted in the detailed indicator byte when the user has requested the Get N Bytes function with a non-positive number of bytes, or insufficient space has been provided within the core block on D0 for dequeueing.
The Invalid Target Offset for Get return code is posted in the detailed indicator byte when the user has requested the Get N Bytes Function with a target offset either negative or too large for dequeue.
The Invalid Record ID return code is posted in the detailed indicator byte when the user has requested the Enqueue function with an invalid record ID.