4 Answers
4

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.

By screen scraping you not only mean getting a screen shot but then deciphering text and other items on the screen.

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.

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)

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: