I am running the same script to access and configure 8 machines at the same time via telnet. I want to spawn 8 telnet sessions which each run the script from one larger script. I need advice on how to spawn a telnet session from within a script?
One way to do what you are trying to do is use the aspect run command to start new instances of procomm for each machine you want to get into.
for machine = 1 upto 8
...
run pw5 Your_Telnet.dir connect telnet telnet_dir_entry getin_machine_script.wax
pause 8
...
endfor
That is the basic command that will do what you asked.
If there is a need for your machines to be aware of what the others have done there have been other discussions about use of DDE but addressing specific multiple Procomm sessions is an issue that doesn't seem to have been answered adequately. If limited knowledge of other sessions is required it might be possible to use the aspect profilerd, profilewr commands to post info to text files that can be easily checked.
Another option you have is to write a child script (or 8 if the steps taken on each connection are different enough), then launch each script, one-by-one, with the execute command. Once the child script completes it's activities and returns control to the parent script, it can report its status to the parent script via the predefined global variables in ASPECT (s0-s9, i0-i9, l0-l9, f0-f9).
You could also use these global variables to pass information to the child script. For example, if you have all your telnet entries in the Connection Directory, you could place the connection to attempt in the global string variable s0. The child script would read that value from s0 then make the telnet connection using the command:
run pw5 Your_Telnet.dir connect telnet telnet_dir_entry getin_machine_script.wax
I am sorry I don't understand the syntax of this statement. Can you please explain how it is working in ordinary language or give me some very simple examples?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.