This procedure connects and logs on to an AS/400 host. You can either modify it to work with your host, or use it with the demonstration 5250 host.
Sub Login ()
With Session
.Connect
.WaitForEvent rcEnterPos, "0:0:30", "0:0:0", 6, 53
.WaitForDisplayString ".", "0:0:30", 6, 49
.TransmitANSI "ednawood"
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI "EdnasPass"
.TransmitTerminalKey rcIBMEnterKey
End With
End Sub