Click here to Skip to main content
15,885,182 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I would like to know if there is a way by which i can read/capture some specific data from a static mainframe screen.

I mean can i read data at some specific position (pixel).

Any help will be greatly appreciated.

--
Thanks & Regards,
Anurag Malani
Posted
Comments
OriginalGriff 6-Feb-15 8:18am    
That depends.
What mainframe, where is your software, and how do they communicate?
anurag.netdeveloper 6-Feb-15 8:24am    
I am not sure how to add screen prints here otherwise that would have made it lot easier for me to explain the problem.

-> I am doing some data extraction (not any sql query but by giving some parameters on it)

-> The result is displayed in the form of screen (that black mainframe screen)

-> I want to copy the content of this screen in a notepad.

Hope it is clear now.
OriginalGriff 6-Feb-15 8:38am    
Is your software running on the same computer that displays the data?
anurag.netdeveloper 6-Feb-15 8:41am    
yes
ZurdoDev 6-Feb-15 8:33am    
What program is the data in?

1 solution

You should be able to get the characters that are on the screen directly.

There ought to be an interface to the mainframe screen software you are using. This would probably be either DDE or WinHLLAPI. To have any chance of doing this you first need to identify the screen emulator software you are using as there are lots of different ones. Then get a programming guide or similar manual that describes the interface for that emulator. Try talking to the tech support people who look after the mainframe- perhaps they might help. If you are really lucky the help on the screen emulator might give some clues.

If that proves impossible you could try sending ctrl A and control C to the emulator from your program and then see what you get on the clipboard. Try it manually first to see if it gets sensible data. Most mainframe screens have a state called "forms mode" that means you only get the data in the forms boxes and this might complicate things. However there are usually control commands that will flip the screen in and out of forms mode that you might need to use to get what you want. Have a look on the emulators menus it might tell you what it is.

If and when you get the data there will inevitably be some strange characters in there that you don't want. These are screen control characters for bold and colors etc. You probably want to strip those out and you may need to replace them by spaces to keep the formatting.

Sorry its not a simple answer but you do need to do a bit more research to narrow down the problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900