Extract global variable action

You can extract information from the host screen and define it as a global variable.

For the region of the host screen, you define the starting and ending rows and columns for the area of the screen you want to assign as a global variable.

In the Advanced section, use the Plane to extract drop-down list to select the data plane to extract. The options are:

Note: For information about the format and contents of the different data planes in the Host Access Class Library (HACL) presentation space model, see Host Access Class Library Planes -- Format and Content at https://www.ibm.com/docs/en/SSS9FA_13.0.0/com.ibm.hod.doc/doc/hacl/DWYL0M88.HTML.

When you extract data for the global variable, you can specify a name for a new global variable or select an existing global variable name from the drop-down list for the Name field.

To specify how text extracted from multiple rows of the host screen is defined in a global variable, click Advanced. You must select one of the radio buttons to specify if the extraction should be treated as one string or as a list of strings (indexed). When you select the Extract this region as one string option, the extracted data is saved in a global variable as a single object in the form of a 2-dimensional character array. When you select the Extract this region as a list of strings option, the data is extracted as a 2-dimensional character array and broken up into individual 1-dimensional arrays, each one representing a single extracted row and stored in an index in the global variable.

If you selected an existing global variable in the Name field before you clicked Advanced, you must click one of the following radio buttons specifying how ZIETrans should handle the extracted data:
  • Overwrite the existing value with this new value
  • Overwrite the existing value with this new value, starting at the specified index
  • Append this new value after the last index of the existing value
  • Insert this new value into the existing value, at the specified index
For the two options that use a specified index, you must enter the number of the index in the Index field.
The following example illustrates how the variable value is modified based on the option you select. Start with an existing indexed variable named "sample". The values of "sample" are "a b c d". The "a" in the value has an index of 0, therefore the value of "sample[0]" is "a", and the "b" in the value has an index of 1, therefore the value of "sample[1]" is "b", and so on. Assume that you extract a new set of values "e f g".
  • If you click the Overwrite the existing value with this new value radio button, the value "a b c d" of "sample" is changed to "e f g".
  • If you click the Overwrite the existing value with this new value, starting at the specified index radio button, and assume an index of 2, the value "a b c d" of "sample" becomes "a b e f g" .
  • If you click the Append this new value after the last index of the existing value radio button, the value "a b c d" of "sample" becomes "a b c d e f g".
  • If you click the Insert this new value into the existing value, at the specified index radio button, and assume an index of 2, the value "a b c d" of "sample" becomes "a b e f g c d".

Selecting the Shared check box will allow the global variable to be shared.

For more information about global variables, see Interacting with global variables.