in reply to How do i interact with a ibm 3270 mainframe?

The first thing I'd check is if you can telnet to the IBM mainframe. Unless it's 20+ years ancient that should be possible (although possibly not enabled). If you can, Net::Telnet, Expect, or similar should do the trick.

If telnet is not an option, there are several tn3270-type programs out there that can be automated with Perl. See scraping screens from a tn3270 terminal and Re: Interact with mainframe screen for ideas.

  • Comment on Re: How do i interact with a ibm 3270 mainframe?

Replies are listed 'Best First'.
Re^2: How do i interact with a ibm 3270 mainframe?
by pedrosantos (Novice) on Dec 16, 2009 at 03:24 UTC

    Thx a lot for the support, i can telnet to the IBM mainframe; i went through links and ended up with the following code:

    use IO::Socket; my $sock = IO::Socket::INET->new( Proto => 'TCP', PeerAddr => '161.196.25.2', PeerPort => '23', ) or die "Unable to create socket: $!\n"; #while ( <$sock> ) { print } @line=<$sock>; print @line;

    Unfortunately, as i run this pl, the machine just "hang up", till CTRL+C is pressed.

    Any examples using Net::elnet, Expect ?

    .

    Regards.

      Yeah, no sense in using raw sockets when Net::Telnet has already been written and thoroughly tested.

      I don't have any examples easily available - I'd have to strip out irrelevant and proprietary code - but the EXAMPLES section of the docs is a good starting point.