• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1436
  • Last Modified:

Read mainframe data through MS Coded UI

I am trying to automate using coded UI and during this I need to read data from Mainframes and compare the data with my front end application.
I tried using the clip board but that does not help as I am not sure that the mainframe data will remain the same. It can change.

Could you please help me with the same.

Thanks!
0
vijethbalaram
Asked:
vijethbalaram
  • 5
  • 4
  • 2
  • +1
1 Solution
 
ThomasMcA2Commented:
That can be done using ODBC, which connects to databases that run on other servers. Once an ODBC driver has been installed on the system where the code runs, the code can use SQL commands to query the remote database.
0
 
vijethbalaramAuthor Commented:
No. I am trying to read data from a mainframe instance or the screen and not from the database.
I do not have access to the database to query data through SQL on the remote database.
0
 
RGRodgersCommented:
Where is the mainframe data?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ThomasMcA2Commented:
The data in the mainframe screen comes from the mainframe database. It would be better to use the same database for your processes.

Although you could use the Copy function from the operating system, and then manipulate the text that is in the clipboard, that is much harder to do (and much more error-prone) than using ODBC.
0
 
giltjrCommented:
If you are trying to read a 3270 screen, your best bet is to use HLLAPI, assuming your 3270 emulator has a HLLAPI interface.

HLLAPI is a programming API that allows you to read/write to the 3270 session.
0
 
RGRodgersCommented:
Guessing is getting anybody anywhere.  This guy either needs to explain or be ignored.  ...RG
0
 
vijethbalaramAuthor Commented:
Right now I am using the copy in the OS and reading data from the clip board but as I previously explained, I do not have access to the database.
The problem with the clipboard is that it gets manipulated across and cannot be used if any other copy is executed. The same is the case if the data that appears on the screen changes.

i am automating the process so that the support team need not intervene and perform manual checks. i hope that the information provided helps you circumvent the guess work. I am using EXTRA! XTreme to view the mainframe data.
0
 
giltjrCommented:
Extra did support HLLAPI and EHLLAPI the last time I used it.  I never wrote any programs using it, but it did support it and I believe it came with a VBScript interface.  Check the manuals/online help.
0
 
vijethbalaramAuthor Commented:
Did that but it does not help as we have an issue with the clipboard getting overwritten and sometimes the co-ordinates not being read consistently.
0
 
giltjrCommented:
O.K., then you need to trouble shoot why those things are happening.

As for the screen not being read consistently I have seen this occur when there is a delay between two screen writes.  Screen write #1 may clear the screen and screen write #2 writes data to it.  If there is a long delay for some reason between the two writes, the screen scraper program may read the empty screen.  

If you know, or can find out, if the mainframe application does, then you need to check for that.  If you are not sure, you may want to put a delay between when your screen scraper program detects the screen has been updated and when you actually read the screen.

As for the clipboard getting overwritten, I have no clue how that could occur unless you have two programs on the desktop trying to use the clipboard at the same time.

Without direct access to the database system or a defined API to the mainframe program screen scraping is the only way.
0
 
vijethbalaramAuthor Commented:
I am sorry but is the screen scraper a program that I need to write? Is it something like embedding an instance of the mainframe in the application and reading through it?
0
 
giltjrCommented:
"screen scraper" is a generic name/term for a program that uses an API to a terminal based system.

In this case it would be the VBScript program you write that is using HLLAPI/EHLLAPI to access terminal emulator session you have Extra.

When you use HLLAPI/EHLLAPI the mainframe thinks it is talking to a terminal, when is reality it is talking to a program.

Did you really write a VBScript to call HLLAPI/EHLLAPI?  Or did you write a terminal macro in VBScript?  They are 2 different things.  When using a macro, you start a terminal session that the user sees and interacts with some.  Then you press a button to execute a macro.  When doing HLLAPI/EHLLAPI typically the user never sees the terminal screen.

What type of mainframe are you access?

Do you know what the backend application server is?
0
 
vijethbalaramAuthor Commented:
Modified this and it works for me
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now