Express Logon Feature (ELF) provides the ability to run a macro and securely log into a host application, without requiring the user to enter a host user ID and password. This macro can also be configured as an On-Connect macro to log on automatically upon successfully connecting to the host. The Flex Terminal Emulator session must be configured with TLS encryption and have client authentication enabled in order for the ELF macro to properly log into the host application. This also means a client certificate must be exported from the host, downloaded and imported into the Windows Certificate Store before ELF can be utilized.


Note: ELF is available only for TN3270 and TN5250 host sessions.


Follow the steps below to configure your Flex Terminal Emulator session to work with Express Logon Feature:


  1. Configure a Flex Terminal Emulator session for SSL/TLS security with Client Authentication enabled.
  2. Record a macro to log on to the host application using a valid user ID and password.
  3. Edit the recorded macro and make the following changes:
    • Add the line Ok = FlexScreen.SendIBMAppID("applid") after the first Ok = FlexScreen.WaitForNoX() statement, where "applid" is the Application ID that is defined on the host by the administrator.
    • Replace the line Ok = FlexScreen.SendKeys("MyUserID") with line Ok = FlexScreen.SendKeys("logon )USR.ID(")
    • Replace the line Ok = FlexScreen.SendKeys(Decrypt("mdkj09cA0diL/B4/T/BL2Q==")) with the line Ok = FlexScreen.SendKeys(")PSS.WD(")
  1. Save the macro.
  2. Enable On-Connect Action>Macro under Connection Setup>Miscellaneous and point to the macro.

    Note: you must disconnect the session to make the above configuration change.

Sample recorded macro prior to ELF modifications:


Sub Main()

   ' On Error Resume Next

   Ok = FlexScreen.WaitForString("TSO", FlexScreen.Position(23, 74))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys("tso MyUserID")

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

   Ok = FlexScreen.WaitForString("field", FlexScreen.Position(24, 75))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys(Decrypt("mdkj09cA0diL/B4/T/BL2Q=="))

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

   Ok = FlexScreen.WaitForString("ispf", FlexScreen.Position(9, 2))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

   Ok = FlexScreen.WaitForString("Cancel", FlexScreen.Position(24, 19))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

End Sub

Sample macro after ELF modifications:


Sub Main()

   ' On Error Resume Next

   Ok = FlexScreen.WaitForString("TSO", FlexScreen.Position(23, 74))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendIBMAppID("applid")

   Ok = FlexScreen.SendKeys("logon )USR.ID(")

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

   Ok = FlexScreen.WaitForString("field", FlexScreen.Position(24, 75))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys(")PSS.WD(")

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

   Ok = FlexScreen.WaitForString("ispf", FlexScreen.Position(9, 2))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

   Ok = FlexScreen.WaitForString("Cancel", FlexScreen.Position(24, 19))

   Ok = FlexScreen.WaitForNoX()

   Ok = FlexScreen.SendKeys(FlexKey.ENTER)

End Sub