Automatic Deletion of TS (Temporary Storage) Queues for CICS TS v4.2

CICS TS (Customer Information Control System Transaction Server) is IBM’s general purpose TP (Transaction Processing) monitor, application server and a middleware for system z servers.

During its regular operation, CICS utilizes TS queues for temporary storage requirements together with other types of resources. It is easy to utilize, just write some data, read later and delete the queue when you finish with it. But if applications are not developed by-the-book then it becomes nightmare for operations people. Local TS data set fills up, tasks either freeze or abend (Abnormally end) after the message:

DFHTS1311 cicsname Temporary storage data set is full and cannot be extended

If operations people cannot judge which queues to “purge”, the region is recycled, TS being started COLD clearing up TS queues.

After a number of incidents, “Lastusedint” parameter of TS entry is considered. This parameter displays the elapsed time in seconds since the queue was last referenced. Following master operator command could be issued or set to automation system for that region to purge TS queues older than 1 hour (3600 seconds):

CEMT Set TSqueue(*) Delete Lastusedint(3600)

Some shops utilize SPI (Systems Programming Interface) programs executed periodically to browse TS queues and delete unreferenced queues after specified interval.

For CICS TS v4.2 a new attribute EXPIRYINT is introduced for TSMODEL resource definition.

OBJECT CHARACTERISTICS CICS RELEASE = 0670
CEDC View TSmodel( USRTSM01 )
TSmodel : USRTSM01
Group : USRTSMDL
DEScription : TO DELETE TS QUEUES THRU EXPIRY
PRefix : +
XPrefix :
Location : Auxiliary Auxiliary ! Main
Expiryint : 00001 0-15000 (Hours)
RECOVERY ATTRIBUTES
RECovery : No No ! Yes
SECURITY ATTRIBUTES
Security : No No ! Yes
SHARED ATTRIBUTES
POolname :
REMOTE ATTRIBUTES
REMOTESystem :
REMOTEPrefix :
XRemotepfx :

Value of EXPIRYINT specifies expiry interval in hours and applicable nonrecoverable and local queues. Recoverable queues and queues created by CICS system are not effected.

Name prefix + (Plus sign) specifies model will match TS queues starting with any characters. Some more specific prefixes can be defined.

After installing model, it can be observed in TS models:

I TSM
STATUS: RESULTS
Tsm(DFHWEB ) Pre(DFHWEB ) Mai Exp(00000)
Tsm(DFHISLQ ) Pre(DFISLCLQ ) Aux Rec Exp(00000)
Tsm(USRTSM01) Pre(+ ) Aux Exp(00001)

If the TS queue name is matched to a TSMODEL with expiry interval, EXPIRYINT value of TS queue is set on creation.

I TSQ
STATUS: RESULTS – OVERTYPE TO MODIFY
Tsq(ESBV ) Num(00001) Len(0000000128) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00001003 ) Exp(00001)
Tsq(E346 ) Num(00001) Len(0000000128) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00002020 ) Exp(00001)
Tsq(IP31 ) Num(00005) Len(0000000640) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00002628 ) Exp(00001)
Tsq(I9IO ) Num(00001) Len(0000000128) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00002620 ) Exp(00001)
Tsq(KOJG ) Num(00002) Len(0000000256) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00004095 ) Exp(00001)
Tsq(KRBH ) Num(00001) Len(0000000128) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00002826 ) Exp(00001)
Tsq(KTAF ) Num(00006) Len(0000000768) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00003902 ) Exp(00001)
Tsq(KTBB ) Num(00001) Len(0000000128) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00001725 ) Exp(00001)
Tsq(MNBZ ) Num(00001) Len(0000000128) Aux
Tra(EKE2) Max(00128) Min(00128) Las( 00001829 ) Exp(00001)

CICS cleanup task periodically scans TS queues once in half an hour and deletes expired TS queues. Scanner issues a message similar to below message upon completion:

DFHTS1605 07/16/2012 12:12:26 CICS7248 Scan of local temporary storage queues completed. 30 local temporary storage queues were scanned and 8 were deleted.

Please note that expiry intervals of TS queues created before installing TS model with expiry interval do not change. Those queues should be deleted once and for all.

You could observe TS queues with last used interval larger than 3600 seconds (up to 5400 seconds actually) even if you set expiry interval to one hour. This is due to the execution periods of CICS scanner. It executes half an hour periods and some TS queues survive beyond 3600 seconds.

Advertisements
This entry was posted in CICS Transaction Server and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s