Variables in a CICS project

You can use variables to alter attribute values quickly and easily, which simplifies deployment to multiple environments because you can resolve the variables by using a properties file that is specific to each environment.

Using variables

Typically, attribute values in resource definitions need to be changed before being installed in to different environments. For example, a data set might have a different high-level qualifier for development, test, and production environments. You can use variables to change parts of an attribute value depending on the environment it is being deployed to, by using a variables.properties file that is specific to each environment.

Variables are resolved during deployment by running the CICS® build toolkit with the --resolve option, before resources are installed in CICS. The properties file that is used to resolve a variable differs depending on whether the variable is in a stand-alone bundle or is included as part of an application.

The most reliable method of creating variables is to use the Insert variable or Extract value to variable wizard in CICS Explorer®. For details, see Creating variables in the CICS Explorer product documentation.

Example usage of variables

The following examples are scenarios for using variables effectively:
  • JVM server names in the CICS bundle parts .osgibundle .warbundle .ebabundle and .earbundle for Java™ applications, where the JVM server name is different in each environment.
  • Data set names in a FILE and LIBRARY definition, where the data set name includes a qualifier for the environment.
  • Specifying CEDF in a PROGRAM definition, where debugging is appropriate for the development environment but not for production.
  • Strings in a VSAM file, where a development environment may only need a small number of strings, but production will need more to improve access times.