Platform differences
The CICS Foundation Classes, as described here, are designed to be independent of the particular CICS platform on which they are running. There are however some differences between platforms; these, and ways of coping with them, are described here.
- fsAllowPlatformVariance
- Applications written using the CICS Foundation Classes are able to access all the functions available on the target CICS server.
- fsEnforce
- Applications are restricted to the CICS functions that are available across all CICS Servers ( z/OS and UNIX).
The default is to allow platform variance and the alternative is to force the application to only use features which are common to all CICS platforms.
- object level
- method level
- parameter level
Platform variations at object level
Some objects are not supported on certain platforms.
For example, IccConsole objects cannot be created on CICS(r) for AIX as CICS for AIX does not support console services.
IccConsole* cons = console(); //No good on CICS for AIXIf you initialize your application with 'fsEnforce' selected (see initializeEnvironment), the previous examples both cause an IccException object, of type 'familyConformanceError' to be thrown on all platforms.
Unlike objects of the IccConsole and IccJournal classes, most objects can be created on any CICS server platform. However the use of the methods can be restricted. Foundation classes reference fully documents all platform restrictions.
Platform variations at method level
Methods that run successfully on one platform can cause a problem on another platform.
void IccUserControl::run()
{
if (strcmp(programId.name(), "PROG1234") == 0)
//do something
}
Here method programId executes correctly on CICS® TS for z/OS®, but throws an IccException object of type 'platformError' on CICS for AIX.
Alternatively, if you initialize your application with family subset enforcement on (see initializeEnvironment function of Icc structure), method programId throws an IccException object of type 'familyConformanceError' on any CICS server platform.
Platform variations at parameter level
At this level a method is supported on all platforms, but a particular positional parameter has some platform restrictions.
task()->abend();
1
task()->abend("WXYZ");
2
task()->abend("WXYZ", IccTask::respectAbendHandler);
3
task()->abend("WXYZ", IccTask::ignoreAbendHandler);
4
task()->abend("WXYZ", IccTask::ignoreAbendHandler,
5
IccTask::suppressDump);
Abends 1 to 4 run successfully on all CICS server platforms.
If family subset enforcement is off, abend 5 throws an IccException object of type 'platformError' on a CICS for AIX platform, but not on a CICS Transaction Server for z/OS platform.
If family subset enforcement is on, abend 5 throws an IccException object of type 'familyConformanceError', irrespective of the target CICS platform.