Screen scraping a mainframe screen in C# *without* 3rd-party utilities

前端 未结 4 1035
孤城傲影
孤城傲影 2021-01-21 01:02

I\'m looking to screen scrape a 3270 mainframe application in C#, but I\'ve got to do so without Attachmate or other 3rd party plugins. Are there free managed libraries to do so

相关标签:
4条回答
  • 2021-01-21 01:06

    Screen Scraping is a term that is used for apps that grab characters from a console by screen location, and implicitely implies that you already have a Terminal Emulator that you are using to display the screens, most (all?) of those terminal emulators will have an API to allow you to do that without any additional 3rd part components (usually via COM or straight DLL's calls)

    However if you are talking about also Emulating the Terminal yourself....

    There is a huge amount of work in Terminal Emulation, it would easily cost you more in effort than simply using a tool, but if you are dead set in rolling your owm, there are a lot of open source implementations that you could grab the source to and grok at their implementation PuTTY is probably nowdays almost a defacto standard. (I don't know what it's written in I suspect C/C++, but if you understand the concepts of it would be easy enough to port to C#, PuTTY does suport 3270)

    0 讨论(0)
  • 2021-01-21 01:16

    Wow, back in the days we used SNA Server for stuff like this. To do all the jumps and hurdles around protocols you could leverage BizTalk Host Integration Server 2009 for this type of stuff. There is a defunt CodePlex project:

    http://www.codeplex.com/Open3270 http://www.open3270.net/

    But it's gone nowhere in 3 years.

    The closes you may get is this:

    http://www.codeproject.com/KB/cs/all_ehllapi.aspx

    0 讨论(0)
  • 2021-01-21 01:23

    http://www.elink.ibmlink.ibm.com/publications/servlet/pbi.wss?CTY=US&FNC=SRX&PBL=GA23-0059-07

    This is the document you are looking for if you plan on doing all of the heavy lifting yourself. It doesn't print out well but is the best source of information on the protocol.

    I am about to embark on this road myself (thanks to the federal government) and in less than two weeks I intend to have a completed application. I don't want to do it, but my parameters state I do not use any third party applications as well. Mine will be in C# as well.

    I would invite you to email me if you'd like my source, but I must warn you, I will not give it away for free. I know you are looking for free.

    0 讨论(0)
  • 2021-01-21 01:33

    I'm going to operate under two assumptions here.

    1. By screen scraping you not only mean getting a screen shot but then deciphering text and other items on the screen.
    2. You can't use 3rd party utilities because you don't want to install them on the system.

    It makes zero sense to try to write your own OCR stuff and any other approaches to grabbing data off a mainframe app are going to be buggy at best. If I were you, I would write a C# app that grabs a screen shot and sends it to a web service. The web service uses a 3rd party utility to screen scrape the screen shot and sends back the appropriate data to the application.

    0 讨论(0)
提交回复
热议问题