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.

Note: References in this section to other CICS platforms are included for completeness. There have been Technology Releases of the CICS Foundation Classes on those platforms.
Applications can be run in one of two modes:
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.

The class headers are the same for all platforms and they "support" (that is, define) all the CICS functions that are available through the Foundation Classes on any of the CICS platforms. The restrictions on each platform are documented in Foundation classes reference. Platform variations exist at:
  • 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.

Any attempt to create an IccConsole object on CICS for AIX causes an IccException object of type 'platformError' to be thrown, but would be acceptable on the other platforms.
IccConsole* cons = console(); //No good on CICS for AIX

If 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.

Consider, for example method programId in the IccControl class:
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.

Consider method abend in IccTask class.

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.