Temporary Storage Queues
Temporary storage provides a means for storing data records in queues. Like files, these records are identified by a unique symbolic name. Temporary storage queues do not have to be predefined to Cics. They can be created in main storage or on auxilliary storage devices. Once created, these records can be read either sequentially or randomly by any other Cics program.
Temporary storage queues are not directly attached to a task. This means that temporary storage queues are task independant. Once a temporary storage queue is written, it remains intact after the task that created it has terminated.
Temporary Storage Queue Commands
There are three commands that process data in temporary storage queues.
* The WRITEQ TS command allows you to write records to a temporary storage queue. If no queue exists when this command is issued, one will be created and the records will be written to it.
* The READQ TS command allows you to read records, either sequentially or randomly, from a temporary storage queue.
* Records in a temporary storage queue can be updated and rewritten by using the REWRITE option of the WRITEQ TS command
* The DELETEQ TS command allows you to delete an entire temporary storage queue. Individual records cannot be deleted
* The queue name specified in a temporary storage command must not exceed eight characters in length
WRITEQ TS QUEUE (queue name)
FROM (data area)
[LENGTH (data value)]
[ITEM (data area)]
[MAIN / AUXILLIARY]
[SYSID (name)]
READQ TS QUEUE (queue name)
INTO (data area)
[LENGTH (data area)]
[ITEM (data value) / NEXT]
[NUMITEMS (data area)]
[SYSID (name)]
WRITEQ TS QUEUE (queue name)
FROM (data area)
[LENGTH (data value)]
[ITEM (data area) [REWRITE]]
[MAIN / AUXILLIARY]
[SYSID (name)]
DELETEQ TS QUEUE (queue name)
[SYSID (name)]
Transient Data Queues
Like temporary storage queues, transient data queues are task dependent. However transient data queues can only be read sequentially.
Unlike temporary storage queues, transient data queues must be defined before they are used. This definition takes place in a special Cics table called the Destination Control Table (DCT). The DCT is usually maintained by a sys prog. One of the fields in each DCT entry tells whether the queue is an intrapartition or extrapartition queue.
Intrapartition Data Queues
Intrapartition transient data queus may only reside on auxilliary storage and can only be read sequentially by other CICS programs. Reading an intrapartition data queue is destructive.
Intrapartition queues may also be associated with Automatic Task Initiation. When the number of records in an intrapartition queue reaches a predefined count a special task is automatically initiated.
Extrapartition Data Queues
Unlike intrapartition queus, extrapartition queues can be accessed by other Cics programs as well as batch programs executing outside of the CICS partition or region. They can reside on any sequential device, such as disk or tape, or be sent directly to an off line printer. Reading records in an extrapartition queue is non-destructive.
WRITEQ TD QUEUE (queue name)
FROM (data area)
[LENGTH (data value)]
[SYSID (name)]
READQ TD QUEUE (queue name)
INTO (data area)
[LENGTH (data area)]
[SYSID (name)]
DELETEQ TD QUEUE (queue name)
[SYSID (name)]
* The WRITEQ TD command allows you to write records sequentially to a transient data queue
* The READQ TD command allows you to read sequentially from a transient data queue
* The DELETEQ TD command allows you to delete the contents of an intrapartition TD queue.
* Transient Data Queues are referenced by these commands using a symbolic name which must be predefined in the DCT
* The queue name specified in transient data commands must not exceed four characters in length
Exceptional Conditions
IOERR - An undetermined error has occured during input or output
ISCINVREQ - an undetermined error has occured on a remote system
ITEMERR - The requested item number is invalid
LENGERR - The length of a record is invalid or missing
NOSPACE - A write has failed due to lack of space
QIDERR - The requested queue cannot be found
QZERO - A read has been attempted on an empty queue
SYSIDERR - The specified remote system is unavailable or not defined
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.