We want to clear all TSQs during CICS start up everyday(we don't need their contents for the next day). We have a lot of programs that use TSQ but we don't want to change thousands of source codes, so, What is the best way to do it in operational environment?

Why not use START=COLD? Cold starting CICS removes all TS queues, among other things.

Thank you Robert. I was looking for a command that purges all TSQ contents before warm restarting of CICS. However, I didn't think of COLD starting, It seems a good and easy solution. I don't know whether COLD starting of CICS everyday has any bad consequences or not. But in general this is a good idea. Thanks.

Thank you Rohit. It was a good reference. Now I'm trying to weight up between CICS cold start and automatic deletion. In our environment during midnight maybe we need to delete a large amount of TSQs(thousands..). It seems to me cold start is the easiest way of deleting all TSQs.

Table 1. Features of temporary storage locations
Temporary storage location Storage type Automatic queue deletion Recovery
Main storage 64-bit storage in CICS region Available Not available
Auxiliary storage VSAM data set, plus 31-bit storage in Available for non-recoverable Available
CICS region for buffers queues
Shared temporary storage pool z/OS coupling facility Not available CICS recovery is not available, but the queues are persistent (they are not affected by a CICS restart)

So the answer to your question is to live without being able to delete them, write a program to delete them one by one, make the applications delete them once done with them, or get them out of the coupling facility so CICS can delete them. As they are currently set up, you have no automated (nor easy) method to delete the TSQs.

What I would want to know at your site is who decided to use a temporary storage server? And were not the advantages and disadvantages thoroughly discussed with the CICS development and operations people before the decision was made? Moving TSQs to the coupling facility is a MAJOR change to the way CICS works and the decision should have taken weeks or months to make at any normal organization.

Table 1. Features of temporary storage locations
Temporary storage location Storage type Automatic queue deletion Recovery
Main storage 64-bit storage in CICS region Available Not available
Auxiliary storage VSAM data set, plus 31-bit storage in Available for non-recoverable Available
CICS region for buffers queues
Shared temporary storage pool z/OS coupling facility Not available CICS recovery is not available, but the queues are persistent (they are not affected by a CICS restart)

So the answer to your question is to live without being able to delete them, write a program to delete them one by one, make the applications delete them once done with them, or get them out of the coupling facility so CICS can delete them. As they are currently set up, you have no automated (nor easy) method to delete the TSQs.

What I would want to know at your site is who decided to use a temporary storage server? And were not the advantages and disadvantages thoroughly discussed with the CICS development and operations people before the decision was made? Moving TSQs to the coupling facility is a MAJOR change to the way CICS works and the decision should have taken weeks or months to make at any normal organization.

Thanks for your good reply. It seems that the only way to clear TSQs is by issuing SETXCF FORCE command on TSQ structure. And I really don't know whether this is a good solution or not?!
And you are right in this case using TSQ server didn't give us any benefit!

It seems that the only way to clear TSQs is by issuing SETXCF FORCE command on TSQ structure. And I really don't know whether this is a good solution or not?!

No, it is not a great solution. However, it is probably the best solution you have right now.

Temporary storage queues -- the name states that they should be TEMPORARY and go away when not needed. Putting them into the coupling facility turns them into PERMANENT structures -- the exact opposite of what people usually mean by temporary storage.

Temporary storage queues -- the name states that they should be TEMPORARY and go away when not needed. Putting them into the coupling facility turns them into PERMANENT structures -- the exact opposite of what people usually mean by temporary storage.