On the VMS machine, my process produces output like this:
As I understand it, cmd does not take any action UNLESS it sees the prompt (HOST$ in this case). If it doesn't see the prompt, the timeout call comes into affect. Is this correct?%WEATHERFILE-I-OPENFILE, Opening Input File: SYS$Weather_Data:20010301 +.WST %WEATHERFILE-I-OPENFILE, Opening Input File: SYS$Weather_Data:20010302 +.WST . . . etc Here is my perl code: use strict; use Net::Telnet; my $name = 'NAME'; my $passwd = 'PASSWORD'; my $telnet = Net::Telnet->new( Input_Log => "input.log", Output_Log => "output.log", Host => "HOST", Timeout => "20" ); $telnet->login(Name => $name, Password => $passwd, Prompt => '/HOST/i'); $telnet->cmd("$mycommand"); $telnet->cmd("lo"); #logout $telnet->close; exit;
In order to aviod the timeout, I could just say that I know how long it takes to process each file on the VMS machine and scale this by the number of files I want to process (and use this as the timeout value).
Is there another way of doing this?
Thanks!
Regards,
Stacy.
In reply to Unix - VMS and Net::Telnet by maderman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |