Working with variables in a resource editor

You can use variables as part of resource definitions in CICS Explorer®. From a resource editor, you can access options to create variables and use content assist to find out what they will resolve to.

Creating variables

You can create variables from existing attributes by using the Extract value to variable wizard. Select an attribute value, or part of an attribute value, right-click, then click Extract value to variable on the menu. For details, see Creating variables.

You can also create variables by using the Insert variable wizard. You can create a new variable when an attribute with no value is selected, or when the editor for an attribute is active but there is no current selection. The Insert variable wizard works in the same way as the Extract value to variable wizard, except that it does not require an initial value.

Working with variables

After variables are created by using the Extract value to variable or Insert variable wizard, they are visible in the resource editor.

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.

A screen capture of a tooltip in the attributes editor, showing possible resolved values and where the variable is set