How to 3270 screen-scrape from a Linux-based web app [closed]
Asked Answered
H

5

8

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.)
Homiletic answered 1/10, 2008 at 12:3 Comment(1)
I know this is an old thread but did you find something to work for you?Fraudulent
B
7

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

Braggadocio answered 2/10, 2008 at 4:11 Comment(2)
Thank you, You have given me hope that I can fix the current mess I inherited. #215336Doublet
you are like an Angel coming right out of heaven to help me when i was just about to give up. Thank you!Poss
D
2

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

Dansby answered 3/6, 2009 at 12:20 Comment(2)
Would you be willing to post your python script or parts of it? I'm working on the same thing and it would probably be helpful to see how someone else did it.Dowland
@RandySyring Unfortunately it was a project in a previous company and I don't have access to that code anymore :(Dansby
B
0

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.

Byrom answered 2/10, 2008 at 3:55 Comment(0)
D
0

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.

Dress answered 12/1, 2009 at 12:49 Comment(0)
F
0

Nighthawk: You could always learn CORBA, that monstrosity of a system was designed to let C programs talk to remote COBOL systems or random stuff written in PL/I or something.

But seriously, if the old app has no API, 3270 screen scraping is fine. There's a lot of similarities between 3270 screens and HTML forms (unlike character mode terminals).

Floro answered 26/9, 2013 at 21:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.