CQS clients and handling special events
A CQS client must be able to either initiate or participate in many different types of events. You must be aware of what the CQS client can do in these events in order to handle them appropriately.
A CQS client must be able either to initiate or to participate in many different types of events. This topic describes some of these special events and what the CQS client can or must do about them.
CQS cold start
When CQS cold starts after connecting to a structure that contains data, CQS looks for unresolved work from CQSMOVE or CQSDEL requests. CQS backs out CQSMOVE requests and completes CQSDEL requests. CQS then performs a system checkpoint, and restart is complete.
CQS does not resolve work that is initiated using a CQSREAD request. As a result, data objects might remain on the queues. The client can issue the CQSRSYNC request to have CQS move these data objects to the cold queue and notify the client that they exist. The client can then issue a CQSRECVR request to access these data objects.
Registering interest in queues with CQSINFRM
Use the CQSINFRM request to allow CQS to notify the client when a data object exists on a queue or when the queue becomes non-empty. The client must register interest in a queue before it is notified of work on that queue.
Working with objects on the cold queue using CQS requests
CQS places objects on the cold queue when either CQS or the client is cold started while there are objects in active structures. A client can use the CQSBRWSE request to examine objects on the cold queue, and then, using the cold-queue token and UOW returned by this request, the client can use a CQSRECVR request to retrieve or delete objects from the cold queue.
CQSQUERY FUNC=QTYPE,QTYPENM=COLDQInitiating checkpoints using CQS requests
A CQS client can initiate a system checkpoint by issuing a CQSCHKPT FUNC=CHKPTSYS request. A CQS client can initiate a structure checkpoint by issuing a CQSCHKPT FUNC=CHKPTSTR request.
Shut down CQS
To shut down CQS, clients can either issue the CQSSHUT request or the CQSDISC request with CQSSHUT=YES specified. In either case, CQS terminates when there are no more structure connections. CQS continues to accept input and output requests so that in-progress work can complete. Structure checkpoints are allowed to be issued. New connections are allowed if the CQSDISC request is issued with CQSSHUT=YES, but they are not allowed if the CQSSHUT request is issued.
Tuning to improve CQS performance
You can improve CQS performance by carefully selecting the parameters you use with the CQSQUERY, CQSDEL, and CQSINFRM requests.