To simplify the deployment of a bundle's resource definition into different environments, you can use variables to alter its attribute values quickly during deployment by associating the variables with properties files that are specific to different environments. To create variables with CICS Explorer®, use the Insert variable or Extract value to
variable wizard.
About this task
Use this procedure to create variables when you edit a
resource definition in CICS
Explorer. For other types of bundle part, you must update both
the bundle part and the variables.properties file
manually.
Use the Insert variable wizard to create a completely new variable. Use
the Extract value to variable wizard to create a variable from an existing
attribute value.
For an overview about using variables in resource definitions in bundles, see Variables in a CICS project.
Procedure
- Open the appropriate wizard, depending on the initial state
of your attribute value:
- If you select an attribute without a value, or if the editor
for an attribute is active but there is no current selection, right-click,
then click Insert variable on the menu.
- If you select all or part of an existing attribute value,
right-click, then click Extract value to variable on
the menu.
-
Enter a name for the variable in the Variable name field. The default
name is resourcename.attributename.
- Select the check box next to each project or binding that
you want to provide a variable value for. If a check box is not selected,
no value will be added to the properties file for that project or
binding.
Note: If you generate a variable value for an
application binding, it will override any values that are contained
in associated bundles.
- In the Value column, enter the value
that the variable will resolve to for the associated project or binding.
- Click Next.
- The next pane provides a preview of the files that the
wizard will change or create. If the changes are as you require, click Finish.
Results
The resource definition in the editor is updated and properties files are updated or created
as required.When you edit resource definitions, you can use your created variables as values. In
the Value field of the Attributes page, press
Ctrl+Space to view a list of available variables and their values.
From the
Attributes page, you can see what a variable will resolve to. When you hover
over a variable in the
Value field, a preview of the resolved value is
provided as a tooltip. If the variable is set by more than one valid
variables.properties file (for example, in the CICS® bundle project and an application binding), the tooltip displays all
possible resolved values.
What to do next
Build the projects and then resolve them by using the CICS build toolkit. For more information, see Resolving variables in a CICS bundle in the CICS TS 6.1.0 product documentation.