You are recommended to include this code in your application. It initializes the CICS® Foundation Classes correctly, provides default exception handling, and releases allocated memory after it is finished. You may substitute your own variation of this main function, provided you know what you are doing, but this should rarely be necessary.
The stub has three functions:
The functional part of the main code is shown below.
int main() 1
{
Icc::initializeEnvironment(ICC_CLASS_MEMORY_MGMT, 2
ICC_FAMILY_SUBSET,
ICC_EDF_BOOL);
try 3
{
ICC_USER_CONTROL control; 4
control.run(); 5
}
catch(IccException& exc) 6
{
Icc::catchException(exc); 7
}
catch(...) 8
{
Icc::unknownException(); 9
}
Icc::returnToCICS(); 10
}