Automatic condition handling (callHandleEvent)

Activate this for any CICS® condition, such as QIDERR, as follows.

IccTempStore temp("TEMP1234");
temp.setActionOnCondition(IccResource::callHandleEvent,
IccCondition::QIDERR);

When a call to any method on object 'temp' causes CICS to raise the QIDERR condition, handleEvent method is automatically called. As the handleEvent method is only a virtual method, this call is only useful if the object belongs to a subclass of IccTempStore and the handleEvent method has been overridden.

Make a subclass of IccTempStore , declare a constructor, and override the handleEvent method.
class MyTempStore : public IccTempStore
{
public:
MyTempStore(const char* storeName) : IccTempStore(storeName) {}
HandleEventReturnOpt handleEvent(IccEvent& event);
};
Now implement the handleEvent method.
IccResource::HandleEventReturnOpt
MyTempStore::handleEvent(IccEvent& event)
{
switch (event.condition())
{
case …
⋮
case IccCondition::QIDERR:
//Handle QIDERR condition here.
⋮
//
default:
return rAbendTask;
}
}

This code is called for any MyTempStore object which is configured to 'callHandleEvent' for a particular CICS condition.