Entity Pattern Tab
Note
Auto-generating patterns simplifies the modeling process, but you may need to delete some auto-generated patterns later to enhance server performance. If you choose to have the Design Tool auto-generate patterns, you can configure properties recognition on the Pattern tab of the Preferences Setup dialog box. In addition, patterns cannot be generated automatically for a VT host.
-
Name - Defines the name or names of the currently defined patterns. When you add a new pattern to an entity, a default name, such as Pattern_1, is generated and default settings are applied in the Position, Properties, and Pattern use boxes. If a pattern is no longer valid (for example, the layout of the screen on the host has changed), the pattern is marked with a red X in the list after running the Entity Repair utility or setting the model to offline mode.
-
Position - Defines the position settings (Row, Height, Column, and Width) that describe the actual position of the pattern on the host screen. First, select a Selection mode (Linear or Rectangular).
By default, the pattern is assumed to always be located in the same place on the terminal window. If the pattern can occur in another position, use one or both of the following to describe where to look to for the pattern:
-
Search for pattern relative to cursor
Relative to cursor means relative to initial cursor position, not relative to the current Terminal window cursor position. If you select Relative to cursor, click Update Initial Cursor Position on the Model menu to change the initial cursor position to the current cursor position. If you have configured any entity properties relative to a cursor position, these property coordinates automatically update. Click Apply to save your changes or click Cancel to revert your initial cursor position back to its original state.
-
Search for pattern in expanded region
The actual pattern or "text" can float inside a larger region defined in the Position box. In these instances, the positioning noted in the Position box functions more as a search region than an exact position. In default color configuration, select the Position settings for region using the green selection rectangle. Select the pattern definition using the red selection rectangle, or use the settings on the Location tab. At runtime, the Host Integrator searches the entire region outlined in green for the text defined by the settings in the Location tab.
If both of these options are enabled, the expanded region is defined relative to the cursor position specified.
-
-
Definition tab
Describes the physical characteristics of the pattern and provides a view of any characters appearing on that area of the host screen. The Design Tool displays different property settings for different types of terminals.
-
Field type and text color
For IBM 3270 and 5250 hosts, the Text check box is selected by default when a new pattern is created. To view the field type or the text color of the pattern as recognized by the host, select the Field type or Text color check boxes.
These options vary based on your host type.
-
Text
Displays the text in the selected area. You can also select < Any text >, < Any number >, < Blank >, or < Regular Expression >. Select the Case sensitive check box if you would like the data stored in your model as case-sensitive text.
The Design Tool cannot recognize patterns under the following conditions:
- A pattern containing a decimal point with a text property type defined as < Any number >.
- A pattern containing only blanks with a text property type defined as < Any text >.
Regular expressions example
You can use regular expressions to have screen recognition based on text that meets the criteria you specify. You may want to define an entity that handles a number of different errors on the host application status line.
To differentiate error messages from other host messages on the status line, create a regular expression that only matches when error messages are displayed on the status line, for example:
ERROR [0-9]{1, 4}: .*
-
Use in entity signature - Defines whether or not a pattern is included in the entity signature. By default, the Use in entity signature check box is selected, which requires that a pattern be present as part of a defined entity. To view details about a specific entity signature, click Signature Analyzer on the Debug menu.
-
Screen properties not present - Defines whether or not screen properties for this pattern are recognized by the Design Tool. Select the Screen properties not present check box to make sure the properties described above for the pattern are not included in the pattern's entity signature.
By default, a pattern is considered "present" when Host Integrator finds its properties on the terminal screen in the correct location. In some cases, however, a pattern is "present" when its properties are not on the terminal screen in the defined location. For example, when modeling the process of scrolling through a set of records such as a bank statement, the host may use a text prompt to tell the user how to scroll when there are more records, then remove the prompt on the final screen. In Host Integrator, a good way to define a NoMoreRecords pattern would be to select the host prompt text, define the pattern, and then select the Screen properties not present check box. The NoMoreRecords pattern is then considered "present" when the host prompt text is not.
-
Location tab
If you selected Search for pattern in expanded region, the settings on this tab identify the location of the pattern definition. Select the region in the terminal window using the red selection rectangle or fill in the settings for row, column, height, and width (Rectangular mode), or offset and length (Linear mode). In default color configuration, this pattern definition area is outlined in red, while the Position settings for region are outlined in green.