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.
Back to
Seekers of Perl Wisdom
|
|