develooper Front page | perl.libnet | Postings from August 2003

Net::Telnet on winNT problems

Theisen, Gary
August 5, 2003 16:20
Net::Telnet on winNT problems
Message ID:
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 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,
                            Prompt => '/\$ $/i');
$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


Gary Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About