views:

1970

answers:

4

I have a LAMP (PHP) web app which need to interface with programs on an IBM 3270 mainframe (via Microsoft SNA Server). One solution I'm looking at is screen-scraping via 3270. (I'm integrating the present with the past!)

Many years ago, I wrote C code which used HLLAPI as the basis for such a task.

  1. Is HLLAPI still the best way to approach this task?
  2. If so, would I be best off just writing a C app to undertake the work necessary and exec() this C app from php?
  3. Are there any open source HLLAPI providers for Linux? (In the past I used commercial solutions such as Cleo.)
A: 

While I have no experience with 3270, I would expect that finding and calling on an outside application or library is your best bet. PHP is not an all-purpose tool, hacking into a non-web communications protocols is best left to languages like C or Java that can handle that well.

acrosman
+2  A: 

I haven't used it but maybe look at http://x3270.bgp.nu/ which says has a version:

s3270 is a displayless version for writing screen-scraping scripts

dajobe
Thank you, You have given me hope that I can fix the current mess I inherited.http://stackoverflow.com/questions/214836/whats-the-most-unsound-program-youve-had-to-maintain#430757
1.01pm
A: 

Screen scraping 3270 applications is a perfectly valid way of getting at data. Many of these applications haven't changed for years, or decades in some cases. Sometimes there is simply no API or other programmatic way of getting at the necessary data.

Nighthawk
A: 

I'm currently trying to do a similar thing but with a command line Python script. I open a pipe to the s3270 (on Windows the exe name is ws3270) to connect to the server and send all commands.

Read carefully those part of the documentation for scripting:

http://x3270.bgp.nu/wc3270-man.html#Actions

http://x3270.bgp.nu/x3270-script.html#Script-Specific-Actions

Patrizio Rullo