What is WRITEQ TS command - IBM Mainframe

The WRITEQ TS command writes temporary data (records) in a temporary storage queue in either main or auxiliary storage. If the write is to a recoverable queue, then after issuing DELETEQ TS, no WRITEQ TS can be issued until a syncpoint has occurred. The syntax of the WRITEQ TS command is given below:

What is WRITEQ TS command

What is WRITEQ TS command

What is WRITEQ TS command

The various options of the command are given below:

  • AUXILIARY-Specifies that the temporary storage queue is on a direct access storage device in auxiliary storage.
  • FROM(data-area)-Specifies the data that is to be written to temporary storage.
  • ITEM(data-area)-Specifies a 16-bit binary field to be used for the item number that is assigned to the logical record in the queue. If the REWRITE option is not specified, the data area receives the item (record) number that is assigned to this record in the queue. If the record starts a new queue, the item number assigned is 1; subsequent item numbers follow on sequentially. If the REWRITE option is specified, the data area specifies the item that is to be replaced in the queue.
  • LENGTH(data-value)-Specifies, as a 16-bit binary value, the length of the data that is to be written.
  • MAIN-Specifies that the temporary storage queue is in main storage.
  • NOSUSPEND-Specifies that the application program is not to be suspended if the NOSPACE condition occurs.
  • QUEUE(name)-Specifies the symbolic name of the queue that is to be written to. If the queue name appears in the Temporary Storage Definitions (TSD) and the entry is marked as remote, the request is shipped to a remote system.

The name of the remote queue is taken from the TSD entry. For a description of how queue names are found by pattern matching, see theTXSeries for Multiplatforms Administration Reference.

When you write applications in COBOL, the name can be up to eight characters long, each of which can contain any bit pattern; and it must be unique within the CICS system. Do not use X'FA' through X'FF' because the first character of the name; these characters are reserved for CICS use.

The same rules apply when using C or C++, except that the name must be a full eight characters in length. Names that are less than eight characters should not be used.

The same rules apply when using PL/I, except that the name must be a full eight characters in length. Names that are less than eight characters should not be used.

If a remote SYSID is specified, the queue is assumed to reside on a remote system irrespective of whether the name exists in the local TSD entry. Otherwise, the TSD entry is used to determine whether the queue is on a local or a remote system.

  • REWRITE-Specifies that the existing record in the queue is to be overwritten with the data that is provided. If the REWRITE option is specified, the ITEM option must also be specified. If the specified queue does not exist, the QIDERR condition occurs. If the correct item within an existing queue cannot be found, the ITEMERR condition occurs and the data is not stored.
  • SYSID(name)-Specifies on which CICS region the WRITEQ is to run. The SYSID name has one through four characters. For a full description of the SYSID option.If the SYSID option is not specified, it defaults to the value that is in the RemoteSysId attribute of the TSD entry that is matched with the queue name that is requested in the QUEUE option.
    Handle Conditions:
  • INVREQ-Occurs if the specified queue is in doubt (that is, locked upon restart and awaiting transaction resolution). Default action: Terminates the task abnormally. IOERR Occurs if an I/O error occurs during the temporary storage operation. IOERR can occur for recoverable auxiliary intrapartition TS queues if the file server has been restarted while CICS is still running. Default action: Terminates the task abnormally.
  • ISCINVREQ-Occurs if the remote system indicates a failure that does not correspond to a known condition. Default action: Terminates the task abnormally.
  • ITEMERR-Occurs for the following conditions:
    1. The item number that is specified or implied by a WRITEQ TS command with the REWRITE option is not valid (that is, outside the range of entry numbers that are assigned for the queue).
    2. The maximum number of items (32767) is exceeded.
    Default action: Terminates the task abnormally.
  • LENGERR-Occurs if the LENGTH option specifies a negative or zero value for the length of the data that is to be written. Default action: Terminates the task abnormally.
  • NOSPACE-Occurs if not enough space is available in temporary storage to contain the data. Default action: Suspend the task until space becomes available as it is released by other tasks; then return normally. (This default action can be overridden by the NOSUSPEND option.)
  • NOTAUTH-Occurs for the following conditions:
    1. When a resource security check is unsuccessful on QUEUE(name)
    2. When SYSID is specified by a transaction that is defined with the RSLCheck attribute set to either internal or external
  • Default action: Terminates the task abnormally.
  • QIDERR-Occurs if the queue that is specified by a WRITEQ TS command with the REWRITE option cannot be found in either main or auxiliary storage. Default action: Terminates the task abnormally.
  • SYSIDERR-Occurs if a problem with the communications configuration prevents the WRITEQ from proceeding. For example:
    1. The connection that is named in the SYSID option is not the name of a Communications Definition (CD) entry.
    2. The SYSID option references a CD entry that is incorrectly configured.
    3. The SYSID option references a CD entry that is marked as out of service.
    It can also occur if the connection to the remote system is closed. This could be because the remote system is not available.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics