IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Find string location on mainframe screen


 
IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Thu Sep 26, 2013 4:15 pm
Reply with quote

Hi,

For automating a manual task, I am trying to send data from excel sheet to mainframe application using VBA code. I am able to connect and communicate using following code,
Quote:
Set MFscreen = GetObject("", "EXTRA.System").ActiveSession.Screen

I am populating required string on mainframe screen using following code (which is working fine),
Quote:
MFscreen.area(4, 9, 4, 10).Value = "ABCD"

At an instance, I need to enter a value on mainframe screen in front of a particular string (say XYZ). For it, I would need the location of that particular string (XYZ) on mainframe screen. I am able to check that the required string (XYZ) is present on mainframe screen using below code,
Quote:
MFscreen.WaitForString "XYZ"

Although i am not able to check its (XYZ) mainframe screen position. Can anybody help in this regards?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Sep 26, 2013 7:33 pm
Reply with quote

Can you post a link to the Extra object reference? (Wherever you got GetObject("", "EXTRA.System").ActiveSession.Screen from)
Back to top
View user's profile Send private message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Fri Sep 27, 2013 2:42 pm
Reply with quote

Thanks for your reply Ed,

I had been using "GetObject("", "EXTRA.System").ActiveSession.Screen" for all my macros and is working fine to connect Excel to Mainframe. I wanted to know if there is some keyword or a simple way to check string location on mainframe screen.

To showcase the scenario, say I have following screen,
Code:
TESTMENU                         COMPANY                09/27/13  11:51:42  0001
 ABCDEFG                   TEST SCREEN SYSTEM                      VERSION:  000
                                                                               
      SRN   OPT DESCRIPTION                                                     
      ---   --- --------------------------------------------------             
  _   XXX       SERVICES 1                                                     
  S   YYY   ABC SERVICES 2                                                     
  _   ZZZ       SERVICES 3                                                       

As shown above, I want to know the location of 'YYY' on the mainframe screen and write 'S' in front of it and 'ABC' after the string. I am facing problem checking the location of string 'YYY' which is (07/07) in above example. Let me know if I had missed any information useful to analyze the issue.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Sep 27, 2013 7:21 pm
Reply with quote

I totally get that. I was hoping you could post the link to the object refence manual so that I could look for something to help you with. I don't have the Attachmate books, so I can't help.

I've done lots of HLLAPI, and there is usually a large set of instructions for reading/writing the screen.

there's even small chance that the WaitFor method returns the location, but it's probably a single number so you'd have to do the math to get row/column.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts Need to split single line into two li... DFSORT/ICETOOL 7
No new posts Need opinion on mainframe to cloud mi... General Talk & Fun Stuff 4
No new posts NOT ABLE TO FIND DB2 ROWS DB2 2

Back to Top