Knowledge Base Ask Cody Resources



 
How do I create multiple sessions to my AS400
Here's how you can open a second session:

iterm=CreateObject("Distinct Intelliterm")
'create first session
iterm.CurrentHost.TerminalType=1
iterm.CurrentHost.Cfg5250.Host="AS400.host.address"
iterm.CurrentHost.Cfg5250.TCPPort=23
iterm.CurrentHost.Connect

'second session

n=iterm.NewSession
host2=iterm.Hosts(n)
host2.TerminalMode = 1
host2.Cfg5250.Host = ... host2.Cfg5250.TCPPort = 23 host2.Connect

In fact, you can use the NewSession function, which returns a free session number for all sessions, instead of using CurrentHost for the first session.






04/19/2024   Legal notices | PRIVACY Policy |