Write data to transient data queue.

WRITEQ TD
>>-WRITEQ TD--QUEUE(name)--FROM(data-area)---------------------->
>--+--------------------+--+-------------------+---------------><
'-LENGTH(data-value)-' '-SYSID(systemname)-'
Conditions:
DISABLED, INVREQ,
IOERR, ISCINVREQ, LENGERR,
LOCKED,
NOSPACE, NOTAUTH, NOTOPEN, QIDERR, SYSIDERR
Description
WRITEQ TD writes transient data to a predefined symbolic destination.
Options
- FROM(data-area)
- specifies the data that is to be written to the transient data queue.
- LENGTH(data-value)
- specifies the length (halfword binary value) of the data to be written.
- QUEUE(name)
- specifies the symbolic name (1–4 alphanumeric characters) of the
queue to be written to. The named queue must have been defined to CICS®.
- SYSID(systemname)
- (remote systems only) specifies the name (1–4 characters) of the
system to which the request is directed.
If SYSID is specified, the queue
is assumed to be on a remote system whether or not it is defined as remote.
Otherwise the transient data queue definition is used to find out whether
the data set is on a local or a remote system.
Conditions
- DISABLED
- occurs when the queue has been disabled.
Default action: terminate
the task abnormally.
- INVREQ
- occurs if WRITEQ names an extrapartition queue that has been opened
for input.
Note: This condition cannot be raised for intrapartition
queues.
Default action: terminate the task abnormally.
- IOERR
- occurs when an input/output error occurs and the data record in error
is skipped.
Default action: terminate the task abnormally.
- ISCINVREQ
- occurs when the remote system indicates a failure that does not correspond
to a known condition.
Default action: terminate the task abnormally.
- LENGERR
- occurs in any of the following situations:
- WRITEQ names an extrapartition queue and does not specify a length consistent
with the RECORDSIZE and associated formations specified in the TDQUEUE resource
definition. The check is made after the XTDOUT exit has been invoked; this
exit may change the length of the data to be passed to the access method.
- WRITEQ names an intrapartition queue and does not specify a length consistent
with the control interval defined for the intrapartition data set. Again,
the check is made after the XTDOUT exit has been invoked.
Default action: terminate the task abnormally.
- LOCKED
- occurs when the request cannot be performed because use of the queue
has been restricted owing to a unit of work failing in-doubt. This can happen on
any request for a logically-recoverable queue defined with WAIT(YES) and WAITACTION(REJECT)
in the TDQUEUE resource definition.
Specify WAIT(YES) and WAITACTION(QUEUE)
in the TDQUEUE resource definition if you want the transaction to wait.
Default action: terminate the task abnormally.
- NOSPACE
- occurs if no more space exists on the intrapartition or extrapartition
queue, or the relative byte address (RBA) for an intrapartition queue would
exceed 2 gigabytes. When this happens, no more data should be written to the
queue because it may be lost.
Default action: terminate the task abnormally.
- NOTAUTH
- occurs when a resource security check has failed on QUEUE(name).
Default action: terminate the task abnormally.
- NOTOPEN
- occurs if the destination is closed.
Note: This condition
cannot be raised for intrapartition queues.
Default action:
terminate the task abnormally.
- QIDERR
- occurs if the symbolic destination to be used with a transient data
control command cannot be found.
Default action: terminate the task abnormally.
- SYSIDERR
- occurs when the SYSID option specifies a name that is neither the local
system nor a remote system (made known to CICS by defining a CONNECTION).
SYSIDERR also occurs when the link to the remote system is closed.
Default
action: terminate the task abnormally.
Examples
The following example shows how to write data to a predefined symbolic
destination; in this case, the control system message log (CSML):
EXEC CICS WRITEQ TD
QUEUE('CSML')
FROM(MESSAGE)
LENGTH(LENG)