Wednesday, July 8, 2009

CICS Queues

Queues are sequential storage facilities, generally transitory in nature because of the dynamic nature of transaction processing. They are typically used to process requests or to pass data from one transaction to another . For example, data produced as part of a transaction is usually not printed until well after its task has been completed; the data waits in a queue for the print program to process it when there is no more urgent work to be done.

A queue is a sequence of data elements identified by a symbolic name. Each element contains record-oriented data of a type specific to the application that is to process it. Elements of different types can be placed in the same queue. For the general type of queue, transactions add (enqueue) elements to the tail of the queue and remove (dequeue) elements from the head of the queue in a first-in first-out (FIFO) manner. Each element must be read sequentially and when read is removed from the queue. Queues support multiple simultaneous requests to enqueue and dequeue elements, growing and shrinking in size according to the volume of requests. A transaction can requeue
elements to another queue for alternative processing.

You can use some queues differently; for example, as a common scratchpad of elements to be written, updated, read, and deleted by any transactions. You can also dequeue elements in a different order from the order in which they were enqueued. Before a queue can be used, you must define it. For example, a queue definition is used by CICS to identify the symbolic name and type of a queue, and to define the queue to the appropriate queue manager.

CICS supports the following types of queues:

Transient data queues provide the general queue functions. Temporary storage queues are typically used for shared reading, writing, and updating by multiple transactions; for example, as a scratchpad for shared data. Application programs can write, read, and delete data in a transient data queues, but cannot update such data. CICS provides the following types of transient data queues:

Temporary storage queues are typically used for shared reading, writing, and updating of data by multiple transactions; for example, as a scratchpad for shared data. Also temporary storage queues can be used to store data either in main storage of the operating system, or in auxiliary storage on a direct-access storage device. Generally, main storage is used if small amounts of data are needed for short periods of time; auxiliary storage is used if data
is to be kept for long periods of time. Transactions can write, update, read, and delete data in a temporary storage queue any number of times until the queue is deleted.

Source : IBM Public Documents

Aveen (Technology COE )

No comments:

Post a Comment