How the macro runtime searches the rectangular area (Wrap option)

If the Wrap option is set to false (the default setting), then the macro runtime searches each row of the rectangular area separately. This method works well when the entire string is contained within one row. For example, if the string is Utility Selection Panel and the rectangular area is (1,1), (24,80), then the macro runtime searches for the string as follows:
  1. Get the first row of the rectangular area. Determine whether the string occurs in the this row. If it does not, then search the next row.
  2. Get the second row of the rectangular area. Determine whether the string occurs in this row. If it does not, then search the next row.
  3. And so on.
In contrast, if the Wrap option is set to true then the macro runtime searches for the string as follows:
  1. Get all the lines of the rectangular area and concatenate them all in order.
  2. Determine whether the string occurs in the concatenated string.

If the string you are searching for can wrap from one line to the next of the session window, then you should set the Wrap option to true. Do not confuse this option with the Unwrap attribute of the Extract action, which is based on fields rather than blocks of text (see Unwrap Text option).

The following description provides an example in which the Wrap option is set to true.

Rows 14–18 of an application screen shows rows 14 through 18 of an application screen:
Figure 1. Rows 14–18 of an application screen
 6  Hardcopy    Initiate hardcopy output
 7  Transfer    Download ISPF Client/Server or Transfer data set
 8  Outlist     Display, delete, or print held job output
 9  Commands    Create/change an application command table
 *  Reserved    This option reserved for future expansion
In the rows above, the first character of each row is a blank space. For example, in row 14, the the first two characters are ' 6', that is, a blank space followed by the numeral 6. Suppose that you want to set up a String descriptor that checks for the following rectangular block of text on this application screen:
Hardcopy
Transfer
Outlist
Commands
Reserved
The steps in setting up the String descriptor for this multi-row block are as follows:
  1. Create a new String descriptor.
  2. Set the values in the Row and Column fields. The row and column location of the upper left corner of the text rectangle above is (14, 5) and the row and column location of the lower right corner is (18, 12).
  3. Set the string value. The string value is:
    'HardcopyTransferOutlist CommandReserved'
  4. Set the Wrap option to true.
  5. Leave all the other options set to the default.
Notice that in step 3 above the five rows are concatenated as a single string, without any filler characters added (such as a newline or space at the end). However, the string does contain a blank space after 'Outlist' because that blank space does fall within the boundaries of the rectangle.