Example

This example configures a sample connection to an AS/400 over MPTN using Auto SignOn.

Sub ConfigureMPTNConnection ()

 With Session

  'Set the session type, terminal model, and transport

  .SetupSession rc5250Terminal, rc31792, rcMPTN

  'Set the NET ID

  .APPNNetID = "APPN1"

  'Set the Location Name

  .LocationName = "JOE"

  'Set the System name

  .Hostname = "MYHOST"

  

  'Turn on Auto Sign on. For this feature to work, you also need

  'to specify a user name and password. Use the SetEncryptedString

  'method to set the password.

  .AutoSignon = True

  .UserName = "Joe"

  .SetEncryptedString rcPassword, "mypassword"

 End With

End Sub