Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Dumb terminals, interactive versus batch, text processing...

by YAFZ (Pilgrim)
on Nov 06, 2003 at 01:37 UTC ( [id://304918]=perlquestion: print w/replies, xml ) Need Help??

YAFZ has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

A friend of mine asked if I can help for an interesting project (or maybe not so interesting :)

Let me describe the system details:

This is a telecom shop which handles the payments of phone subscribers. They have a dumb terminal, namely an IBM InfoWindow II 3153 which is connected to a modem through an RS232 serial port (AdaLink 336 V34 +Leased Line Dial Backup). As soon as the dumb terminal is turned it connects to a remote central computer (running AIX, 4.3 I guess). User enters the login info, password, etc. and then the main menu appears. After that, the most routine thing is to choose some menu item and then enter some phone number to retrieve simple payment data for it. Later if everything is OK the same procedur + 1 step can be applied to tell the system that the payment has been done.

The problem is that there are tens of thousands of numbers that must be checked and payed every month regularly. However, as I described above the system is fully interactive. What needs to be done is to develop a system that can connect to the remote computer, and after reading some file, sending the required keystrokes to the remote system and retrieve information, then send some keystrokes, check what returns, etc. and do these for thousands of numbers in a batch processing style, non-interactively in order to prevent human error.

From a theoretical point of view what I need is to be able to process the data over the serial port using a PC. Practically I wonder if this can be done using Perl. First of all I have to connect to remote computer using the dial-up line and then the rest follows. However, I must be able to grab the text data and be able to interpret the terminal escape sequences, send the required keystrokes, etc. I guess.

If that is possible simply using Perl I'd like to know what kind of modules I need. Or if you have a better idea (for example is EXPECT more suitable this problem?) I'd like to know this.

Hope you can enlighten me.
  • Comment on Dumb terminals, interactive versus batch, text processing...

Replies are listed 'Best First'.
Re: Dumb terminals, interactive versus batch, text processing...
by BrowserUk (Patriarch) on Nov 06, 2003 at 02:25 UTC

    Be warned. The InfoWindows aren't your average 'dumb terminals'. They are, what is known in IBM speak as Fixed Function Workstations. They have some (probably rom-based) intelligence built-in that you would need to emulate.

    There used to be an IBM product called something like InfoWindow Control Program, a DOS program that allowed a pc to be used to talk to the InfoWindow system. It also exposed an API. There may have been a unix version or similar. I can't find much reference to the program on the first page of a google search, but if you (your friend) contacted IBM, they maybe able to offer specs or even give you access to source -- I've known them do that for withdrawn products, though they'll probably try and sell you an 'upgrade':)

    If not, you may need to resort to using a line monitor to dump a session and reverse engineer the protocol.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!
    Wanted!

Re: Dumb terminals, interactive versus batch, text processing...
by Roger (Parson) on Nov 06, 2003 at 01:51 UTC
    I think it could be more appropriate to use a terminal Emulator with SDK. The following are the ones that I have used:

    SIMWARE ------- A2B ENTERPRISE ATTACHMATE ---------- EXTRA! FOR WINDOWS
    The SDK provides built-in screen scraping, emulated key-stroke, etc. and works on virtually all kinds of terminals.

    Otherwise if you want to do it in Perl, then check out the modules Device::SerialPort (linux) and Win32::SerialPort (windows) on www.cpan.org, and good luck.

Re: Dumb terminals, interactive versus batch, text processing...
by YAFZ (Pilgrim) on Nov 06, 2003 at 09:00 UTC
    Thanks a lot for valuable comments, I started to dig in for info around Google ;-) I'll also try to contact IBM Turkey to check if we can get some specs. and/or software etc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://304918]
Approved by Roger
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found