A feature toggle is used to enable or disable a feature during runtime. From CICS TS V5.4, we provide feature toggles so that you can more easily opt into new function between releases. This article tells you how they work and what you can do with them.
- CICS feature toggles are temporary switches that let you control when and where to activate any APAR-delivered new functions that require changes to the CICS configuration.
- The toggles are set in a properties files on zFS, along with any associated configuration options. You can specify your own feature toggles in the same way.
- CICS commands allow you to inquire on the feature toggle settings or browse the feature toggle configuration of a region.
Why do we provide feature toggles?
We recognised that the customers had a need for a more rapid delivery of key capabilities. The recognition of this need led us to continuous delivery.
We deliver new functions as soon as we have them ready, so that you can use them without waiting for the next release. We started continuous delivery with Java capability with Liberty and grew the scope to any capability that we can deliver as service APARs.
Some of these new capabilities require changes to the CICS configuration â€“ the kind of changes that you would previously expect only with a new release of CICS. A recent example is Multi-Factor Authentication (MFA) in the CMCI to allow the CICS Explorer to use MFA tokens, introduced in APAR PI87691.
Continuous delivery demands a new approach to configuration changes. Thatâ€™s where feature toggles come in. Feature toggles make it easier for you to make the necessary configuration changes between releases to enable the new capabilities. They are light-weight in size compared to SIT changes that typically come with a large chain of service pre-requisites and non-intrusive: if you donâ€™t enable the feature, there is no impact on system behaviour.
How does a CICS feature toggle work?
In CICS, a feature toggle is a configuration option to specify whether a CICS region supports a new function. It works like a SIT change but on a temporary basis.
You define the feature toggles in a file called featuretoggle.properties. This file is in a zFS directory, specified by the SIT parameter USSCONFIG. The feature toggle sets the new function on or off:
The name of the feature toggle is fully-qualified. The CICS toggles all start with com.ibm.cics.
Hereâ€™s an example of the feature toggle used to enable MFA in the CMCI:
# enable the CMCI JVM server (only applicable to the WUI region)
Some features require additional configuration options. These options are specified in a similar way to the feature toggles themselves:
The CICS documentation gives details on the options and the format of the expected values.
Unlike SIT overrides, CICS ignores unknown feature toggles. The feature properties file doesnâ€™t have dependencies on the level of service that is applied. If you are using a common feature toggle file between multiple regions, some of which have the service applied which use the feature, and some don’t then those regions that don’t know about the feature will ignore the toggle.
The CICS TS 5.5 open beta provides an SPI and XPI to inquire on the settings of feature toggles and to browse the feature toggle configuration of CICS regions:
INQUIRE FEATUREKEY(data-value) VALUE(data-area)
Production-ready or work-in-progress?
Traditionally, in software development, the feature toggle is used to release work-in-progress features. In CICS, the feature toggle doesnâ€™t indicate a different quality of feature. All the features that you can toggle on or off are as ready to use as the rest of the CICS release.
In a generally-available release of CICS, a feature that is enabled by a feature toggle goes through the same development processes as any other feature.
In an open beta release of CICS, a feature that is enabled by a feature toggle is, like the rest of the product, under development. In beta releases, the flexibility of feature toggles allows you to test potential new function and provide feedback to the CICS team before the function reaches a production release. This kind of feature toggle might not make the product documentation but is communicated as part of the beta program.
How long will a feature toggle be there?
CICS feature toggles arenâ€™t intended to replace SIT parameters as the way to configure CICS. They are temporary configurations.
Feature toggles will generally be withdrawn one or two releases of CICS after their introduction. Feature toggles that are introduced for evaluation in beta releases might never surface in a generally-available version of CICS.
For some functions, feature toggles and their configuration options will evolve into a regular SIT parameter in a future release of CICS. In other cases, they will disappear as their associated function becomes part of the CICS base function.
Add your own feature toggles
As a client or a vendor, you can use the feature toggle properties file to specify your own feature toggles and configuration options.
For example, as an alternative to using the CWA or a data table for defining constants, you can specify feature toggle properties, then use the SPI to read the value of a feature keyword. An application can use this information for its own configuration purposes.
If you use your own feature toggles, for uniqueness, we recommend a prefix in the form of com.company.application.
For more information
Take a look in the CICS documentation: