FALSE

Page Nav

HIDE

Grid

GRID_STYLE

WriteQ TS Command (TSQ)

The WRITEQ TS command                  EXEC CICS                       WRITEQ TS QUEUE(name)                       FROM(data-area)        ...

The WRITEQ TS command
                 EXEC CICS
                      WRITEQ TS QUEUE(name)
                      FROM(data-area)
                       [ LENGTH(data-value) ]
                       [ ITEM(data-area) [ REWRITE ] ]
                       [  NUMITEMS(data-area) ]
                       [ SYSID(name) ]
                       [ MAIN | AUXILIARY ]
                      [ NOSUSPEND ]
               END-EXEC

options
QUEUE One to eight character queue name.

FROM The data area from where the data is to be written to the queue.

LENGTH A binary half word PIC S9(4) COMP field that specifies the length of the record to be written.

ITEM A half word PIC S9(4) COMP field which specifies the item to be rewritten when REWRITE is specified. If REWRITE is not specified, CICS ignores this field on input and sets it with the item number of the newly written item on return.

REWRITE specifies that the item should be rewritten.


NUMITEMS A binary half word field that CICS sets with the number of items (including this one just written) in the queue. Not valid if ITEM is coded.

SYSID Connection name of the remote system where this queue is defined.

MAIN Specifies that the item should be held in main storage.

AUXILIARY Specifies that the item should be held in auxiliary storage.

NOSUSPEND If sufficient space does not exist for the record, don’t suspend the calling task. Return with the NOSPACE response.

Exceptions
INVREQ The queue name is invalid, or the queue was created for CICS internal use and cant be written into by a user program.

IOERR An IOERR occurred.

ITEMERR No record exists for the item number specified.

NOSPACE There is insufficient space to hold the TS record.

QIDERR The specified queue does not exist.(conceivably possible only when you attempt rewrite)

SYSIDERR The system defined by SYSID could not be located or accessed.

ISCINVREQ An indeterminate error occurred on the remote system.

Notes
  1. TS queues are automatically created when you write a record to a queue that does not exist.
  1. Main or auxiliary lets you choose between the queue being on main or auxiliary storage.
  1. If the data being passed between applications is small use the commarea. If more than say 4k use a queue instead.
  1. If you want the queue name to be unique, use the terminal ID in the EIBTRMID field as the queue name.
  1. If you code NOSUSPEND, control is returned immediately to your program if sufficient space does not exist for the record. You can detect it by the NOSPACE condition.

1 comment

Unknown said...

Business intelligence Analyst
SQIAR (http://www.sqiar.com/services/bi-strategy/) is a leading Business Intelligence company.Sqiar Provide business intelligence Services Which help the company to present Information in Meaningful form.