Net::Telnet on winNT problems
[email protected] ("Theisen, Gary") Tue, 5 Aug 2003 18:20:08 -0500
| Newsgroups | perl.libnet |
|---|---|
| Message-ID | <E2455C8B4A4AD21187C700805F31BC231D664665@USSAM202> |
Hi all,
I've been searching the web/lists/doc's but have yet to find an answer, I've
tried to do my homework first before posting here.
My scenario:
Using winNT 4.0 box & IIS webserver using mainly PHP for scripting. PHP
doesn't support (yet, so my script will call this to be PERL script) what I
need to do which is.
1. Connect to a mainframe (os/390).
2. Browse a VSAM file & extract specific data into an array.
Very simply....at least seemingly so. The access to the VSAM file is the
key here. I can make an FTP & telnet connections no problem. FTP from PHP
web script & telnet from 3rd party JAVA client.
My web script needs to call this perl script, which will work "behind the
scenes" to populate the array on the local machine.
I need to somehow open a connection to the mainframe w/o doing an FTP
download. The file I'm browsing is enormous, so an FTP isn't feasible.
I've read that using Net:Telnet (which I have successfully installed/made on
my NT 4 box), is very tricky on a windows box because windows doesn't use a
"real" telnet client.
This is my code so far:
use Net::Telnet;
$uID = "something"; $uPASS = "thepass";
$telnet = new Net::Telnet ( Timeout=>5,
Errmode=>'die',
Prompt => '/\$ $/i');
$telnet->open('mainframe.com');
$telnet->login($uID, $uPASS);
print $telnet->cmd('who');
times out...says waiting for login prompt.
What is the workaround to this? A free windows telnet that installs
smoothly & can be used with Net:Telnet?
Has anyone actually gotten something like this to really work??
Sorry for the long winded post....any suggestions/links to actual working
tutorial??
Thanks!!
Gary