Skip to main content

Host Adaptor 3270

Spanish

Introduction

With this Adapter, created by TAST, what we do is to connect to any Host and interact with it.It allows us on the one hand to test on mainframe HOST screens and also to generate macros that allow us to automate tests in systems “transformed to HTML”.

In other words, we record a series of keyboard actions that will be executed later. This process generates a file, which is automatically saved in a path in our directory. Then we access to TAST and from the Wizards box we import it and it will generate a diagram that will reflect step by step all the actions performed. Afterwards we will save it, validate it and execute it in the TAST client.

Initialization Parameters

Connection

You must have downloaded the executor: “jagacy3270-5.4.0.jar”. In the initialization process it is necessary to provide the following information so that the connection with the Host 3270 server can be established. 

  • Host: Name of the machine or IP address. Required. SESSION_HOST.
  • Port: Connection port. Required. SESSION_HOST_POST. It is 23 by default.
  • Use proxy: Check this if you want to use a proxy.
  • Proxy host: Name of the proxy or IP address. It is localhost by default.
  • Proxy port: Port of the proxy. It is 1080 by default.
  • LU_Name: Name of the connection LU, optional.
  • Enhanced: Indicates whether the Enhanced protocol is used. (by default is not checked). SESSION_TN_ENHANCED.
  • Telnet_Negotiated: The telnet information.
  • Server_Authentication: Information of authentication to the 3270 Server.
  • Client_Certificate_Autentication: Certificate for Authentication.
  • Personal_Certificate: Personal certificate for Authentication.
  • Personal_Certificate_File Path: Path to the Certificate for Authentication.
  • Personal_Certificate_pass: Pass to the Certificate for Authentication.
  • Certificate_Name: Name of the Certificate.
  • Certificate_Pass: Pass to the Certificate.
  • Certificate_Source: Source to the Certificate.
  • Certificate_URL: Url to Certificate.
  • Prompt_Required: PromptRequired.
  • Certificate_Based_Keys: Certificate Based Keys.
  • SSL: SSL.
  • KeyStore_FilePath: KeyStore File Path.
  • P12_FilePath: P12 File Path.
  • KeyStore_Pass: KeyStore Pass.
  • Certificate_Trusted: Certificate for Authentication.
  • Code_Page: Code Page. By default it is INTERNAL – Built-in EBCDIC conversion (CP037).
  • Session_Type: Session Type.
  • Security_Type: Security Type.
  • Protocol: Protocol.
  • Protocol_Version: Protocol Version.
  • Certificate_Type: Certificate Type.


Predefined Functions (PF's)

  • clearAndWriteField: clears and writes a text in a field in the indicated field.
    • Parameter Field: Field number starting with 1
    • Parameter Offset: Offset in the field starting with 1
    • Parameter Value: Text.
  • clearField: clears the field with field number entered in the parameter.
  • containsText(Text): this function evaluates if within a host screen, there is a specific text that we define in this function.
    • Parameter Text: In the message mapping, the text that we want to find is added in the “Value field”.
  • getLenghField: gets the length of the field with field number entered in the parameter.
  • getTextLocation: searches for a text and returns its position. If the position is not found it returns(-1, -1). 
  • nextScreen: this function advances directly to the next navigation screen (you will have previously had to go through it to find it). It requires no parameters in its coding.
  • previusScreen: this function advances directly to the previous navigation screen. No coding parameters are required.
  • readField(Field,Offset,Length): this function reads a field that we define in its parameters.
    • Parameter Field: Position (numeric) in which the field is located.
    • Parameter Offset: Position within the field from which you want to read.
    • Parameter Length: Length of the field to be read.
      These 3 parameters are obtained by clicking the right mouse button, on the field we want to read.


  • readRow(Row): this function reads a particular line on the screen. The whole line.
    • Parameter Row: Position (numerical) in which the line is located.
      This parameter is obtained by clicking the right mouse button on the line we want to read.


  • readScreen: this function reads the screen on which you are positioned. Function without parameters.
  • readScreenByRows: reads the current screen by rows.
  • rowContaintsText(Text,Row): this function checks if a certain text exists in a screen line.
    • Parameter Text: Enter the text to search for.
    • Parameter Row: Position (numeric) of the line.
      These parameters are obtained by pressing the right mouse button, on the line we want to find the defined text.


  • waitCRC(screen_CRC): this function waits for the screen we want to see next.
    • Parameter screen_CRC: Value → Obtained by right-clicking on the screen we want to display.


  • waitFor: wait for the time in seconds received in the parameter to elapse.
  • waitForChange(TimeOut(msec)): this function waits for time for the next screen to be displayed.
    • Parameter TimeOut (msec): Value → Time in msec to wait to be displayed.
  • waitForText(Text,Row,Column): this function waits for a certain text to appear before displaying the following screen.
    • Parameter Text: Value→ Text to be displayed.
    • Parameter Row: Row of the word.
    • Parameter Column: Column of the word.
  • writeAftherLabel (Label,Text): this function writes to the screen any text, after the label we have defined in the Label parameter has been displayed (on the screen).
    • Parameter Label: Value→ Text to be displayed.
    • Parameter Text: Text that we are going to write.
  • writeBeforeLabel (Label,Text): this function writes to the screen any text, before the label we have defined in the Label parameter has been displayed (on the screen).
    • Parameter Label: Value→ Text to be displayed.
    • Parameter Text: Text that we are going to write.
  • writeField (Text,Field,Offset): this function writes to a given field the value we defined in the Text parameter.
    • Parameter Text: Value→ Text to appear.
    • Parameter Field: Field to be written.
    • Parameter Offset: Position of the field.
      These parameters are obtained by right-clicking on the screen we want to display.


  • writeKey (Key): this function executes a predefined key on the screen.
    (ENTER, PF8, PF4, etc…).
    • Parameter Key: Value→ Function key.
  • writeKeyUntilFind(Key, Text): this function executes the function key (Key) and waits for the text (Text) to appear on the screen.
  • writeText (Text,Row,Column): this function writes a text in a defined position.(line and column).
    • Parameter Text: Value→ Text to write.
    • Parameter Row: Value→ Row Number.
    • Parameter Column: Value→ Column number.
      These parameters are obtained by right-clicking on the screen we want to display.

Macro generation

As already mentioned in the Introduction, with this adapter, it is possible to generate macros that allow to automate tests in systems “transformed to HTML”. We are going to explain how to record a series of keyboard actions, in order to execute them later.

We connect to the 3270 emulator:


Click on the Macro option to record the test and then check the Record option in the drop-down menu that appears.


Give a file name.


And we start recording, confirming by clicking the OK checkbox.


Once we finish, we stop recording by clicking Stop recording in the drop-down menu.


And confirm the stop by clicking on the OK checkbox.


This process generates a toExport file that is automatically saved in the following path:
C:\Users\xxxxx\jagacy_data
where xxxxx will vary depending on the name of each user. Later we will need to find this file to import it.

ExportMacro3270-7.png

Next, access the TAST tool.

  • We check the new diagram box and access Domain, Project, Folder, Diagram name and Diagram description, as we always do when we design a new diagram. Then the Canvas or blank canvas appears.
  • Access the toolbar and click on the Assistants box.
  • A drop-down menu with different options will appear. The options to choose are:

    • Import from 3270 to 3270.

    • Import from 3270 to HTML.

  • We import from the wizard the toExport file that we have recorded and saved in the C: Drive.
  • In any of the two options provided by the Assistants box, a diagram will be automatically generated, which will reflect step by step, the whole recording process of the different actions performed and in which two adapters will appear, the User Object adapter and the 3270 adapter.
  • Save and validate the diagram.
  • And finally, we will take it to the TAST client to execute it.