QUEUE TRAN command
Use the QUEUE TRAN command to enqueue a message to the specified transaction or to dequeue and discard messages currently enqueued to the transaction.
The QUEUE TRAN command is defined to OM as ROUTE=ALL. When this command is issued, OM routes the command to all IMS systems that have registered for the command. Depending on the environment, either only the command master IMS processes the command or all IMS process the command. If only the command master processes the command, all other IMS systems that receive the command return with a return and reason code indicating that they are not the IMS command master.
Subsections:
Environment
The following table lists the environments (DB/DC, DBCTL, and DCCTL) in which you can use the commands and keywords.
| Command / Keyword | DB/DC | DBCTL | DCCTL |
|---|---|---|---|
| QUEUE TRAN | X | X | |
| NAME | X | X | |
| DATA | X | X | |
| OPTION | X | X |
Syntax
Keywords
The following keywords are valid for the QUEUE TRAN command:
- NAME(tranname)
- Specifies the 1- to 8-character name of the transaction.
- DATA(messagedata)
- Specifies the message data to enqueue to the transaction. The
data is variable in length. This parameter is only valid for OPTION(ENQ).
If the COMM macro is defined with OPTION=NOBLANK, DATA is an optional
parameter. If the COMM macro is defined with OPTION=BLKREQD (the
default), at least one character, even if it is a blank, must be specified
in the message data area.
The data can be specified in mixed case. If the transaction is defined as EDIT=ULC, the data is enqueued as it was specified on the command, without any uppercase translation. If the transaction is defined as EDIT=UC, the data is translated to uppercase before the message is enqueued. No EDIT routine is called before the data is enqueued.
The data is enqueued as a single segment message. The maximum length of data that can be enqueued is 32 763.
- OPTION()
- Specifies the option parameters:
- ENQ
- This is the default. Indicates that a message is to be enqueued
to the specified transaction. The ENQ function is processed only by
the command master IMS in both
the local queues and shared-queues environment. Any output generated
by the transaction is sent as an unsolicited output message to the
OM that originated the command. Any MFS formatting associated with
the output message is not returned.
The transaction specified for the ENQ cannot be full-function response mode or a Fast Path transaction. The initiated transaction can be conversational, but it cannot be in conversational mode with OM.
- DEQALL
- Indicates that all messages currently enqueued to the transaction
should be dequeued and discarded. The transaction must be stopped
before messages can be dequeued.
DEQALL is valid in both local queues environment and the shared-queues environment. If IMS is in the local queues environment, all IMS systems that receive the command process the QUEUE TRAN OPTION(DEQALL) command. If IMS is in the shared-queues environment, only the command master IMS processes the QUEUE TRAN OPTION(DEQALL) command.
A QUEUE TRAN OPTION(DEQALL) command can dequeue transaction messages queued to a transaction from APPC or OTMA Clients. The command only dequeues the transaction messages. The APPC or OTMA transaction instance blocks (TIB) created at the IMS system are not deleted and the storage may remain allocated until the next IMS restart. For APPC, the TIB is not released and the APPC conversation (the client) hangs if there is no timeout value specified. The APPCIOT=(x,Y) timeout value for APPC would deallocate the APPC conversation and release the TIB after the timeout limit has been reached.
- DEQ1
- Indicates that the first (oldest) message on the queue for the
transaction should be dequeued and discarded. The transaction must
be stopped before the message can be dequeued.
A QUEUE TRAN OPTION(DEQ1) command can dequeue transaction messages queued to a transaction from APPC or OTMA Clients. The command only dequeues the transaction messages. The APPC or OTMA transaction instance blocks (TIB) created at the IMS system are not deleted and the storage may remain allocated until the next IMS restart. For APPC the TIB is not released and the APPC conversation (the client) hangs if there is no timeout value specified. The APPCIOT=(x,Y) timeout value for APPC would deallocate the APPC conversation and release the TIB after the timeout limit has been reached.
Usage notes
This command is processed if the transaction is defined locally at the IMS system. If the transaction is not defined at the IMS system, the Destination Creation exit routine, DFSINSX0, is called. If the exit routine successfully creates a transaction, the command is processed. If the exit does not create a transaction, a response line is returned with an error completion code indicating that the transaction is not found.
The effect of this command differs depending on whether the IMS processing it uses RM's resource structure. If it does use the resource structure, a message can be enqueued even if the transaction is stopped locally if the transaction does not have a global status of STOQ. To dequeue one or all messages, however, the transaction must be stopped globally and locally for scheduling (STOSCHD). If the IMS does not use the resource structure, no messages can be enqueued if the transaction is stopped for queuing (STOQ). To dequeue one or all messages, the transaction must be stopped for scheduling (STOSCHD).
The QUEUE TRAN OPTION(ENQ) command
is not supported for conversational, response mode, Fast Path, and
remote transactions. This form of the command performs security checking
on the transaction name and on the user ID that issued the command.
For OPTION(ENQ), workload management (WLM) CLASSIFY
calls are issued using information passed to the OM from the command.
The information passed includes LUNAME=DFSOMAPI and the user ID. Also
for OPTION(ENQ), if the transaction name specified
is a remote transaction, the message is placed on the shared queues
(on the transaction ready queue) using the remote transaction name.
The command is not processed if the MSNAME associated with the remote
transaction is stopped. The TM and MSC Message Routing and Control
user exit routine, DFSMSCE0, is not called for a QUEUE TRAN command.
The maximum length of the data that can be enqueued is 32 763 bytes. The data is enqueued to the transaction as a single segment.
8 byte transactionname + 8 byte IMSID + output messageIf
the transaction is processed by an IMS Version
9 or earlier, any generated output to the input destination is not
queued. The application program receives a status code of AD.Output fields
<cmdrsphdr> and <cmdrspdata> XML
tags. The short label is generated in the XML output. The keyword
listed is the keyword on the command that causes the field to be generated.
A value of n/aindicates that the output field is always returned. A value of error indicates that the output field is returned if there is an error (for example, a nonzero completion code).
| Short label | SHOW keyword | Meaning |
|---|---|---|
| CC | n/a | The completion code for the output line. The completion code is always returned. |
| CCTXT | n/a | The completion code text that explains the completion code. The member name is always returned. |
| MBR | error | The IMSPlex member that built the output line. |
| TRAN | n/a | The name of the transaction resource. |
| LQCNT | OPTION(DEQ1 | DEQALL) | The number of messages dequeued from a local queue. |
| QNCT | OPTION(DEQ1 | DEQALL) | The number of messages dequeued from the shared message queue. |
Return, reason, and completion codes
Commands that are issued through the OM API, including QUEUE TRAN, produce a standard set of OM return and reason codes, which are defined in CSLORR.
The following table includes the return and reason codes and a brief explanation of the codes. The return or reason code returned for the command might also indicate an error from a CSL request.
| Return code | Reason code | Meaning |
|---|---|---|
| X'00000000' | X'00000000' | The QUEUE TRAN command completed successfully. |
| X'00000004' | X'00001000' | The IMS system is not the command master, so the QUEUE TRAN command is not processed on the IMS system. |
| X'00000008' | X'00002004' | An invalid keyword combination of DATA and OPTION(DEQ1|DEQALL) is
specified, so the QUEUE TRAN command is not processed. |
| X'00000008' | X'00002008' | An insufficient number of keywords is specified, so the QUEUE TRAN command is not processed. |
| X'0000000C' | X'00003004' | The QUEUE TRAN command is not successful for the resource name specified. The completion code indicates the reason for the error with the resource name. The completion codes that can be returned by the command are listed in the QUEUE TRAN completion code table. |
| X'00000010' | X'0000400C' | The QUEUE TRAN command is invalid on the XRF alternate. |
| X'00000010' | X'0000401C' | The QUEUE TRAN command is invalid on the FDBR region. |
| X'00000010' | X'00004034' | The message queues are not available, so the QUEUE TRAN command is not processed. |
| X'00000014' | X'00005004' | DFSOCMD0 GETBUF storage could not be obtained, so the QUEUE TRAN command is not processed. |
| X'00000014' | X'00005008' | DFSPOOL HIOP storage could not be obtained, so the QUEUE TRAN command is not processed. |
| X'00000014' | X'00005FFF' | The QUEUE TRAN command could not be processed because of an internal error. |
The following table contains completion codes that can be returned on a QUEUE TRAN command.
| Completion code | Meaning |
|---|---|
| 0 | The QUEUE TRAN command completed successfully for the specified resource. |
| 10 | The resource was not found. |
| 17 | Another command is in progress for this transaction. |
| 1A | Transaction has an active conversation. Use the /EXIT command to terminate the conversation and to dequeue messages. |
| 51 | No resource structure |
| 52 | Resource structure full |
| 5F | The QUEUE TRAN command is rejected, because the transaction name specified has invalid characters. |
| 8A | An unsupported wildcard name was used, so the QUEUE TRAN command is not processed. |
| 8B | A DFSQMGR request error occurred, so the QUEUE TRAN is not processed. |
| 8C | The transaction is stopped, so the QUEUE TRAN OPTION(ENQ) is not processed. |
| 8D | The transaction is not stopped, so the QUEUE TRAN OPTION(DEQ1|DEQALL) is not processed. |
| 94 | RM Request error |
| 96 | A RACF® security failure has occurred, so the QUEUE TRAN OPTION(ENQ) is not processed. |
| 98 | CQS request error |
| 99 | Transaction is not initialized |
| 9A | QUEUE TRAN OPTION(ENQ) is not supported for conversational mode. |
| 9B | QUEUE TRAN OPTION(ENQ) is not supported for Fast Path transactions. |
| 9C | QUEUE TRAN OPTION(ENQ) is not supported for response mode transactions. |
| 9D | The MSNAME associated to remote transaction is stopped. |
| 9F | QUEUE TRAN OPTION(ENQ) is not supported for a remote transaction. |
Examples
The following are examples of the QUEUE TRAN command:
Example 1 for QUEUE TRAN command
QUEUE TRAN NAME(PART) OPTION(DEQALL)Trancode MbrName CC LQcnt
----------------------------------
PART IMS1 0 5
PART IMS2 0 2Explanation: The command was processed by all the IMS systems that received the command. IMS1 had five messages dequeued from its local queue, and IMS2 had two messages dequeued from its local queue.
Example 2 for QUEUE TRAN command
TSO SPOC input:
QUEUE TRAN NAME(PART) DATA(message1) TSO SPOC output:
Trancode MbrName CC
PART IMS2 0Explanation: The QUEUE TRAN command completed successfully and was processed by the command master.
Example 3 for QUEUE TRAN command
TSO SPOC input:
QUEUE TRAN NAME(PART) OPTION(DEQALL) TSO SPOC output:
Trancode MbrName CC Qcnt
PART IMS3 0 2 Explanation: This example shows the QUEUE TRAN OPTION(DEQALL) in a shared-queues environment. Two messages are dequeued by the command master IMS.
Example 4 for QUEUE TRAN command
TSO SPOC input:
QUEUE TRAN NAME(PART) OPTION(DEQALL) TSO SPOC output:
Trancode MbrName CC LQcnt
PART IMS2 0 2
PART IMS3 0 0
PART SYS3 0 1 Explanation: This example shows the QUEUE TRAN OPTION(DEQALL) in a Local Queues environment. Each IMS processes the command.
