Rational Developer for System z

Working with variables on the Basic tab

This topic describes tasks you can perform with variables on the Basic tab of the flow message editor.

You can perform additional tasks with variables on the Advanced tab (see Using the Advanced tab of the flow message editor).

Creating a simple variable

You can create a simple variable on the Basic tab but not a complex variable. (To create a complex variable you must go to the Advanced tab.)

To create a simple variable:
  1. In the left pane of the Basic tab, right-click the message within which you want to create the variable.
  2. Click Add Element.

The flow message editor creates a new variable of type string with a default name and adds the variable to the end of the message.

Changing the properties of a variable

To change the properties of a simple variable or a complex variable:
  1. In the left pane of the Basic tab, select the variable.
  2. In the right pane, in the Properties group, type or select the new values that you want to use for the various properties.
    Note:
    • The simple types shown as string, integer, and float, are actually XML Schema data types xsd:string, xsd:integer, and xsd:float.
    • To create an array, change the Occurs property to a value greater than 1.

The flow message editor changes the properties of the variable to the values that you specify.

Copying and pasting a variable within the same message file

To copy and paste a simple or complex variable within the same message file:
  1. In the left pane of the Basic tab, right-click the variable.
  2. Click Copy.
  3. Right-click the message into which you want to copy the variable. It can be the same message that contains variable or another message.
  4. Click Paste.

The flow message editor creates a new variable having the same properties and data type as the original variable, gives the new variable a default name, and adds the new variable to the end of the selected message. This is a shallow copy (see Shallow copying and deep copying).

Copying and pasting a variable from another message file

There are two ways to copy and paste a variable from one message file into another. The first way is described in this topic. The second way is described in Dragging a variable from the EST Project Explorer.

To copy and paste a simple or complex variable from one message file into another:
  1. Open the source message file in the flow message editor.
  2. On the Basic tab or on the Advanced tab:
    1. Right-click the variable that you want to copy.
    2. Click Copy.
    Note: Alternatively, you can right-click a variable in the Outline view and then click Copy.
  3. Open the target message file in the flow editor if it is not already open.
  4. In the left pane of the Basic tab:
    1. Right-click the message into which you want to copy the variable.
    2. Click Paste.
The flow message editor does the following in the target message file:
  1. If the data type of the source variable is not a standard type the editor creates a new data type that is a duplicate of the data type of the source variable. The editor assigns a default name to the new data type and stores it at the end of the Types folder.
  2. The editor creates a new variable having the correct data type and having the same properties as the source variable.
  3. The editor gives the new variable a default name and adds it to the end of the target message.
This is a deep copy (see Shallow copying and deep copying).

Dragging a variable from the EST Project Explorer

The second way to copy and paste a variable from one message file to another is to drag the source variable from the EST Project Explorer to a target message on the Basic tab of the flow message editor:
  1. Open the target message file in the flow message editor.
  2. Select the Basic tab.
  3. In the EST Project Explorer, locate the variable that you want to copy into the opened message file. This variable can be in the same message file or in a different message file.
  4. Drag the source variable from the EST Project Explorer to the target message on the Basic tab of the flow message editor.

The flow message editor performs the copy in the same way described in Copying and pasting a variable from another message file.

Deleting a simple variable

To delete a simple variable:
  1. In the left pane, right-click the variable.
  2. Click Delete.

The flow message editor deletes the variable from the message.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)