Rational Developer for System z, Version 7.6

Select Variable window: Setting Extract options

This topic describes the Extract options in the Select Variable window.
This topic includes the following subtopics:

Extract data every iteration of the loop

The Extract data every iteration of the loop check box is present only when you create an Extract action while you are recording a loop:
  • Clearing this check box causes the Extract action to store the extracted text into the same instance of the selected variable in each iteration of the loop, overwriting any text stored there by the same Extract action in the previous iteration.
  • Selecting this check box causes the Extract action to store the extracted text into a separate instance of the selected variable in each iteration of the loop.

Either scenario can be useful, depending on the application and on your requirements.

When you select this check box the Maximum number of iterations field specifies the maximum number of iterations for the loop and the required number of instances for the Extract variable (see Maximum number of iterations).

Maximum number of 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. This field is significant only for Extract actions in the current recorded loop for which you have selected the check box Extract data every iteration of the loop.

By default a recorded loop is terminated at runtime on the condition that the default loop variable (a String variable) becomes equal to 'FALSE'. In addition, when the Extract data every iteration of the loop check box is selected for an Extract action inside a loop recording, then a second condition is added to the loop check that terminates the loop at runtime after the number of loop iterations specified in the Maximum number of iterations field is reached. (The two conditions are independent; either condition terminates the loop.)

This same value specified in the Maximum number of iterations field is also the required number of separate instances that the Extract variable must contain, so that the Extract action can store the extracted text into a separate instance of the Extract variable in each iteration of the loop.

The Maximum number of iterations field is significant for all Extract actions in the current loop being recorded for which you select the check box Extract data every iteration of the loop. This group includes not only Extract actions in Invoke screen operation nodes within the recorded loop but also any Extract actions in the Exit Loop node following the recorded loop. In this group of Extract actions:
  • For the first Extract action with the check box selected, the Maximum number of iterations field is an input field. You must specify a value for the maximum number of iterations for the loop.
  • For subsequent Extract actions with the check box selected, the Maximum number of iterations is non-updatable and is set to the value that you specified for the first Extract action.

The Maximum number of iterations field has no effect on Extract actions in the loop that do not have the Extract data every iteration of the loop check box selected.

Reading text from a field

Clearing the check box Extract area into variable causes the Extract action to copy all the characters contained in the selected field as a single string into the selected variable. (You select the field from the application screen after the Select Variable window closes.) The Extract action substitutes a blank space for any character in the field that is displayed as a white space in the application screen.

The selected variable must be a simple variable (a String variable).

See Table 1:

Table 1. Extract action: Options for reading and storing the text
Options for reading the text: Options for storing the text:
Type of variable: If inside a loop, instances of the variable:
A field in the current application screen. A simple variable.
  • A separate instance for each iteration of the loop; or
  • A single instance that is overwritten in each iteration of the loop.
A rectangular area of the current application screen. A simple variable, with optional character delimiters.
An array variable, with each row of text from the rectangular area stored into an element of the array.

Reading text from a rectangular area

Selecting the check box Extract area into variable causes the Extract action to read all the text contained in the rectangular area that you specify, regardless of field boundaries. The Extract action substitutes a blank space for any character in the rectangular area that is displayed as a white space in the application screen.

The selected variable can be either of the following (see Table 1.)
  • A simple variable (a String variable):
    • The rows of text from the rectangular area are copied as a single string into the selected variable.
    • Optionally you can specify character delimiters to mark the ends of fields and the ends of rows of text.
  • An array variable (an array of Strings):
    • Each row of text from the rectangular area is copied into a separate element of the array, starting with the first element (element [1]) and going forward sequentially.
    • The selected variable must have a cardinality value that is exactly equal to number of rows of text in the rectangular area (see Cardinality), or you can use automatic configuration (see Automatic configuration of the selected variable).


Terms of use | Feedback

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