Rational Developer for System z

Creating multiple Extract actions

This topic describes how to create Extract actions during flow recording using the Create Multiple Extract Actions window.

This window is useful when you want to quickly create multiple Extract actions, each of which extracts text from a single field of the application screen. For a summary of the features of this window see Table 1 in Overview of creating Extract actions.

To create multiple Extract actions:

  1. Navigate to the application screen where you want to create the Extract actions.

  2. On the toolbar of the host editor click Extract Data from Screen Extract > Create multiple Extract actions.
    Tip: Before you open the window, you can preselect the fields for which you want to create Extract actions by selecting a rectangular area on the application screen around those fields. When the Create Multiple Extract Actions window opens, the preselected fields are automatically selected in the left pane of the window and are also highlighted by red rectangles in the right pane.
  3. If you have not yet selected a variable message file and a variable message for the flow that you are recording, then the host editor opens the No Variable Message File window and prompts you to select or create a message file and a message for the flow (see Specifying a variable message later on during flow recording). Make your selections and click OK.

  4. The Create Multiple Extract Actions window opens:
    • In the left pane you select:
      1. The variable into which you want the Extract action to store the text.
      2. The field from which you want an Extract action to read text.
    • In the right pane, which displays an image of the application screen:
      • You can select the field for an Extract action.
      • You can view all the fields that have been selected for any Extract action: each such field is surrounded with a red rectangle.

    For each Extract action that you want to create:

    1. In the left pane of the window, in the Field column, select the check box beside the field from which you want the Extract action to read text. The window highlights the field in the right pane by surrounding it with a red rectangle.
      Tip: Alternatively, you can use the mouse in the right pane to select the field for the Extract action. To create multiple Extract actions, click each field for which you want to create an Extract action.
    2. In the left pane of the window, in the Variable column, select the variable that you want to use for the Extract action. This is the variable into which the Extract action stores the text that it reads from the field of the application screen at runtime.

      Note: The variable is always a String variable.

      You can use the default variable, create a new variable, or select an already existing variable:

      • Using the default variable:

        As a convenience each field in the Field column has beside it in the Variable column a default variable that is used by default as the variable for the Extract action. The name of the default variable is the same as the name of the field.

        Note: In many cases a default variable in the Variable list represents a variable that has not been created yet. If so, then the window creates the actual variable when it creates the Extract action (i.e. when you click OK).
      • Creating a new variable:

        To create a new variable for the Extract action:
        1. Click the field name.
        2. In the input field, erase the default name and type the name for the new variable.

      • Selecting a existing variable:

        To select an already existing variable for an Extract action:
        1. Click the field name.
        2. Expand the drop-down list to display the existing String variables in the variable message.
        3. Select the variable that you want to use.

      Also, see the Note on variable type, cardinality, and maximum iterations at the end of this topic.

    3. If you are currently recording a loop (see Recording loops) then the following two options are also displayed. These options have the same effects here as they do in the Select Variable window for creating Extract actions. However, here these options also affect all the Extract actions that you create in this instance of the Create Multiple Extract Actions window:

      • Extract data every iteration of the loop:

        Use this check box to indicate whether you want the Extract action to store the extracted text into the same instance or into a separate instance of the selected variable in each iteration of the loop (see Extract data every iteration of the loop and Iterative data and non-iterative data).

      • Maximum iterations:

        The Maximum number of iterations field specifies the maximum number of iterations that the loop currently being recorded is allowed to run at runtime (see Maximum number of iterations).

    4. Click OK when you are finished creating Extract actions.

The window creates the Extract actions that you specified. In the session area of the host editor, the field for each Extract action that you created is highlighted with red square brackets, as in Figure 1:

Figure 1. Highlighting a field for an Extract action
Extract from a single field

If you are doing a flow recording, then after you finish the recording and save the updated flow you can see a mapping for each Extract action in the appropriate mapping routine inside the mapping file for the flow.

Note on variable type, cardinality, and maximum iterations:

The variables that you select or create in the Create Multiple Extract Actions window are subject to the same rules of variable type, cardinality, and maximum iterations as the variables in the Select Variable window for creating Extract actions (see The characteristics of the variable must match the Extract options).

However, in the Create Multiple Extract Actions window the effects of these rules are somewhat limited in scope:

  • Type of variable:

    In the Create Multiple Extract Actions window, because you can create only Extract actions that read text from a single field of the application screen (rather than from a rectangular area) therefore the target variable for an Extract action in this window is always one of the following:
    • A String variable containing the contents of a single field, if either of the following is true:
      • You are not recording a loop; or
      • You are recording a loop and you are storing the extracted text into the same variable for each iteration of the loop.
    • An array of such String variables, if you are recording a loop and you are storing the extracted text into a separate instance of the variable for each iteration of the loop.
    See Type of variable
  • Cardinality:

    Likewise, in the Create Multiple Extract Actions window, because you can create only Extract actions that read text from a single field of the application screen (rather than from a rectangular area) the cardinality of a variable in this window is always 1 (see Cardinality).
  • Maximum iterations:

    The rules for maximum iterations are the same in the Create Multiple Extract Actions window and in the Select Variable window for creating Extract actions. However, these rules apply only when you are recording a loop (see Maximum iterations).
Also, in both windows:
  • For existing variables, the window displays only variables whose format matches the Extract options that you select.
  • For new variables or for default variables that not have been created yet, the window automatically creates a variable having the appropriate format.

Marking ahead

You can preselect the fields for which you want to create Extract actions by selecting a rectangular area on the application screen around those fields. When the Create Multiple Extract Actions window opens, the preselected fields are already selected in the left pane of the window and are highlighted with a red rectangle in the right pane.


Terms of use | Feedback

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