Rational Developer for System z

Adding a Rectangle descriptor

A Rectangle descriptor is evaluated as true if the text specified in the descriptor matches the text in the specified rectangular area of the currently displayed application screen.
To create a Rectangle descriptor:
  1. Right-click the screen description to which you want to add the descriptor.
  2. Click Add Descriptor > Add Rectangle Descriptor.
    Note: Alternatively, instead of doing steps 1 and 2, you can do the following:
    1. On the Screen Descriptions tab, click the screen description to which you want to add the descriptor.
    2. Click Editor Menu > Add Rectangle Descriptor on the menu bar of the workbench.
  3. The Rectangle descriptor is created. The rectangle is initially set to the size of the entire application screen. That is:
    • The Start Position property is initially set to 1.
    • The End Position property is initially set to the offset within the application screen of the character at the lower right corner of the application screen, not including the OIA (Operator Information Area).
    • The Match String is initially set to the text contents of the entire application screen.

You can modify the properties displayed in the Properties view:
  1. Select the property that you want to modify.
  2. Type or select the value that you want the property to have.
Tip: If the Properties view is not visible, see Opening or reopening a view.

Also, for the Start Position, End Position, and Match String properties, you can use the marking rectangle displayed in the screen image on the right side of the Screen Descriptors tab:
  1. When you click Add Rectangle Descriptor, the screen message editor displays a dotted yellow marking rectangle around the rectangular area specified by the Start Position and End Position properties.
  2. Drag a corner of the marking rectangle to change the shape of the rectangle.
  3. Drag the entire marking rectangle to change the location of the rectangle.
  4. To clear the marking rectangle, click once over the screen image, outside the marking rectangle.
  5. To make the marking rectangle appear again, click once over the screen image.
Table 1 lists each property and its significance:
Table 1. Rectangle descriptor
Property: Significance:
Case Sensitive
  • If this property is set to true, then the text string in the Match String property is compared with text string in the specified rectangular area of the application screen, using a case-sensitive comparison.
  • Otherwise a case-insensitive comparison is used.
End Position The offset within the application screen of the character at the lower right corner of the rectangle. This offset is calculated from the (Row, Column) position of the character as follows:
Offset = ((Row-1)*RowSize)+Column
For example, assuming that the screen is 25 rows by 80 columns, then the offset of the character at Row 24, Column 80 of the application screen is:
Offset = ((24-1)*80)+80
       = 1920
Invert Match After the descriptor has been evaluated as true or false with respect to the currently displayed application screen, the value of the Invert Match property is checked:
  • If the Invert Match value is true, then the boolean result obtained by evaluating the descriptor is inverted, changing true to false or false to true.
  • If the Invert Match value is false, then the boolean result is not inverted.
Match String The text to be compared with the text contents of a rectangle having the specified start position and end position in the currently displayed application screen.
Start Position The offset within the application screen of the character at the upper left corner of the rectangle. This offset is calculated in the same way as the offset for the End Position property. For example, assuming that the screen is 25 rows by 80 columns, then the offset of the character at Row 1, Column 1 of the application screen is:
Offset = ((1-1)*80)+1
       = 1

Feedback