Está en la página 1de 15

QUEUES

CICS Training Class-08

Introduction to QUEUES
Queues are temporary storages for holding up records that need to be processed. They are not physically stored. The processing is much faster for the queues as they are available readily in main memory There are two types of queues :

Temporary Storage Queue (TSQ) Transient Data Queue (TDQ)

Temporary Storage Queue

TSQS provides application programmer the ability to store and retrieve data. Application can use TSQ like a scratch pad TSQ are:

reated and deleted dynamically !o " S table entry required #if recovery !$T required% "dentified by queue id # & to ' bytes%

(ach record in TSQ identified by relative position called the Item Number

More about TSQ

$perations:

)rite a record *ead data sequential and random +pdate ,elete the queue

Access:

Transactions Terminal

Storage :

-ain !on recoverable Au.iliary recoverable #must have TST entry%

Typical +se :

,ata passing among Transactions Terminal paging *eport /rinting

W ITEQ TS

EXEC CICS WRITEQ TS QUEUE(Q NAME) R!M(DATA"AREA) #EN$T%(DATA"&A#UE) ITEM(DATA"AREA) ' REWRITE MAIN ' AUXI#AR( END"EXEC)

onditions : "T(-(**0 1(!2(**0 Q",(**0 !$S/A (0 !$TA+T3

eadQ TS

EXEC CICS READQ TS QUEUE(Q NAME) INT!(DATA"AREA) #EN$T%(DATA"&A#UE) ITEM(DATA"AREA) ' NEXT END"EXEC)

onditions : "T(-(**0 1(!2(**0 Q",(**0 !$S/A (0 !$TA+T3

!elete" ts

,elete all entries in the queue

EXEC CICS DE#ETEQ TS QUEUE(Q NAME) END"EXEC

onditions : "T(-(**0 1(!2(**0 Q",(**0 !$S/A (0 !$TA+T3

Transient data "ueue

T,Q provides the programmer with queuing facilities ,ata can be stored fro internal4e.ternal processing Stored data can be routed to symbolic destination T,Qs require , T entry "dentified by destination ", & to 5 bytes

Intra and e#tra partitioned T!Qs

"!T*A partitioned: associated with the same " S subsystem.

Typical uses:

ATI (Automati* tas+ initiation ) asso*iate, -it. trigger /e0e/ Message s-it*.ing

(.tra /artitioned: associated with internal4e.ternal cics0 to any sequential dives like ,AS, TA/(

T6/" A1 +S(S :

#ogging ,ata1 transa*tion error messages storing

$perations: )rite a record *ead data sequential and random ,elete the queue

$utomatic tas% initiation

AT" is the facility through which a cics transaction can be initiated automatically. T6/(8"!T*A0 ,(ST",8-S2S0 T*A!S",#-S2&%0 T*"21(98:;; )hen the number of record reaches :;;0 the transaction msg& will be initiated automatically.

,73, T

W ITEQ T!

EXEC CICS WRITEQ TD QUEUE(Q NAME) R!M(DATA"AREA) #EN$T%(DATA"&A#UE) ITEM(DATA"AREA) ' REWRITE MAIN ' AUXI#AR( END"EXEC)

onditions : "T(-(**0 1(!2(**0 Q",(**0 !$S/A (0 !$TA+T3

E$!Q T!

Rea,s t.e 2ueue ,istra*ti0e/y1 re*or, is not a0ai/ab/e in t.e 2ueue a3ter t.e rea,) EXEC CICS READQ TD QUEUE(Q NAME) INT!(DATA"AREA) #EN$T%(DATA"&A#UE) ITEM(DATA"AREA) ' NEXT END"EXEC)

onditions : "T(-(**0 1(!2(**0 Q",(**0 !$S/A (0 !$TA+T3

!E&ETEQ T!

,elete all entries in the queue

EXEC CICS DE#ETEQ TD QUEUE(Q NAME) END"EXEC

onditions : "T(-(**0 1(!2(**0 Q",(**0 !$S/A (0 !$TA+T3

Di33eren*es bet-een TSQ4s an, TDQ4s)


"n TSQ0 data can be written and read either sequentially or randomly0 while in T,Q0 the data is written or read only sequentially. "n TSQ0 the data can be read any number of times because it remains in the queue until the entire queue is deleted. "n a T,Q data item0 it is read only once. ,ata can be updated in place for TSQ0 but not in T,Q. The TSQ name is defined dynamically0 while a T,Q name is defined in the , T. TSQ can be written to au.iliary or main storage0 while T,Q is written to disk. TSQ does not use a trigger level while T,Q data has a trigger level #automatic task initiation%.

T'an% (ou

También podría gustarte