Create HOST Modules

This chapter describes how to create your own HOST Modules and how to scan these HOST controls:

The Standard subset contains Modules that perform specific tasks for the HOST Engine 3.0. For detailed information, see chapter "HOST Modules".

For information on how to steer HOST controls, see chapter "Steer HOST Engine 3.0 controls".

Scan your HOST application

To create HOST Modules, scan an active and connected HOST session with Tosca  XScan.

To do so, right-click a Module folder and select Scan->Remote Terminal. Alternatively, click on the dynamic menu Modules and select  Scan->Remote Terminal or use the keyboard shortcut Ctrl + Shift + T.

Choose your HOST session mode

The HOST Engine 3.0 allows you to create Modules in emulator and headless session modes.

HOST emulator session

An emulator session uses an active HOST emulator connection to navigate your mainframe application via your emulator.

Emulator sessions support ASCII and Japanese character sets. For Japanese characters, first enable the support in your project settings. It is possible that the Scan may display characters that are not visible in the emulator.

To start an emulator session, follow these steps:

  1. Make sure your emulator is connected to a session.

  2. In the Host Scan window, select Connect to emulator session from the dropdown list in the Connection Settings.

  3. Click Connect.

  4. Go to your emulator to navigate your mainframe application.

HOST headless session

A headless session uses an active HOST headless connection to navigate your mainframe application via the Host Scan window. Headless sessions only support the ASCII character set.

To start a headless session, follow these steps: 

  1. In the Host Scan window, specify a connection name in the Connection Settings.

  2. Add the Port of your HOST.

  3. Set the maximum time allowed for any communication between HOST Engine 3.0 and HOST server.

  4. Specify the endpoint of your HOST.

  5. Click Connect.

  6. You're now ready to scan your mainframe application:

    If you plan to enter sensitive information, like passwords or user credentials, use the Input Password button in the ribbon menu. This lets you input sensitive data in a separate field, which is then safely sent to the mainframe without showing your input on the screen.

Host Scan window

Characters of HOST controls

Tosca measures all heights and widths of HOST controls in characters.

When selecting a control area in the Host Scan window, avoid separating double-width characters. A double-width character occupies two character units instead of the standard one. To ensure a correct scan of Host controls, it is important to pay attention to this.

Enable Japanese character support

To use the Japanese character support for HOST emulator sessions, follow these steps: 

  1. Navigate to Project->Settings to open the Settings dialog in your workspace.

  2. Create a new category named Host in the Settings->TBox->Engines.

  3. Create a new setting with the name CodePage and the value 932.

Create new setting to activate Japanese character support

You can now start your emulator session!

Scan HOST Labels

The control Label allows you to steer messages in your HOST application.

To create this control, follow the steps below:

  1. In the HOST Scan window, select  Label.

  2. In the Content Preview area, highlight the line where your text is located. Tricentis Tosca automatically uses the following properties to define your control:

    • Height specifies the height of the label.

    • Width specifies the width of the label.

    • Column specifies the on-screen position of the starting column of the label.

    • Row specifies the on-screen position of the starting row of the label.

  3. Click  Finish Screen and then  Close.

Scan HOST TextBoxes

The control TextBox allows you to steer texts and execute keyboard commands in your HOST application.

To create this control, follow the steps below:

  1. In the HOST Scan window, select  TextBox.

  2. Click on Search TextBoxes to search for text boxes, or highlight the content in the Content Preview area. Tricentis Tosca automatically uses the following properties to define and locate your TextBox:

    • Height specifies the overall height of the control.

    • Width specifies the overall width of the control.

    • Column specifies the on-screen position of the starting column of the control.

    • Row specifies the on-screen position of the starting row of the control.

  3. Click  Finish Screen and then  Close.

Scan HOST Tables

To create a Module to steer tables, follow the steps below:

  1. In the HOST Scan window, select  Table.

  1. By default, Tricentis Tosca counts every line as a row. If you want to choose a different height for each row of your table, use the following property:

    • RowHeight specifies the row height. The default value is 1.

  2. Select  Area and highlight the outer area of your table in the Content Preview area. Alternatively, you can define the area manually in the Properties pane.

    Tricentis Tosca uses the following properties to define and locate your table:

    • Height specifies the overall height of the table.

    • Width specifies the overall width of the table.

    • Column specifies the on-screen position of the starting column of the table.

    • Row specifies the on-screen position of the starting row of the table.

    • NoScroll specifies whether the table spans over multiple screens or not. The default value is False.

    • ScrollForwardKey specifies the key to scroll the table forward. The default value is {F8}.

    • ScrollBackwardsKey specifies the key to scroll the table backwards. The default value is {F7}.

  3. Select  Columns and define the columns of your table in the Content Preview area. Alternatively, you can define the columns manually in the Properties pane.

    Tricentis Tosca uses the following property to identify the columns of your table:

    • ColStartList is a comma-separated list for the first character of every column, relative to the control coordinates. This property always starts with 1.

  4. By default, Tricentis Tosca uses the first row as the header of a table. If you want to use a different row as header, select  Header and define it in the Content Preview area. Alternatively, you can define the header manually in the Properties pane.

    Tricentis Tosca uses the following properties to identify the header of your table:

    • HeaderRow specifies whether the table has a header or not. The default value is -1 for a table without a header. If you define a header, this value changes to 1.

    • HeaderHeight specifies the height of the header, counted from the top of the table. The default value is 0.

  5. Click  Finish Screen and then  Close.

Avoid saving HOST Module with the wrong screenshot

Tricentis Tosca saves the Modules that you create with HOST Engine 3.0 with an attached screenshot. The attached image is of the content that was visible on the preview screen when you clicked Finish Screen.

If you navigate to another screen in your HOST emulator, the image doesn't change in the HOST Scan content preview automatically. This can result in saving a Module with the wrong image.

To avoid saving Modules with the wrong screenshot attachment, follow the steps below:

  1. Before you navigate to another screen in your emulator, click Finish Screen.

  2. Navigate to the desired screen in your HOST emulator.

  3. Click Scan Screen and select controls that you want to scan on that screen. The image in the HOST Scan content preview changes to show the right emulator screen.