473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access VBA and Quick3270 mainframe emulator

11
I'm not sure if this is the right area to post this one. I have a few Access programs that contain VBA code that currently have a reference to Attachmate Extra Basic to allow some automation between the Access program and our mainframe.

The company I work for has now decided that Attachmate is too expensive and have decided to convert to Quick3270 and I have absolutley no say in what they do. I am hopeing someone out there can give me a push in the right direction to get things to work the same.

I can create the reference and create the objects but for some reason I cant get it to actually do anything to the session once it is open. Following is something very simple that should just type some text on the screen however I get nothing, not even an error.

Expand|Select|Wrap|Line Numbers
  1. ' send something to the screen
  2. Set objQuick3270 = CreateObject("Quick3270.Application")
  3. Set objSession = objQuick3270.ActiveSession
  4. Set objScreen = objSession.Screen
  5.  
  6. With objScreen
  7.  .PutString ("HELLO")
  8. End With  
Thank-you.
Oct 27 '09 #1
5 14769
Stewart Ross
2,545 Expert Mod 2GB
Hi. This is more of a Quick3270 question than a VBA one really, and I for one am not familiar at all with the emulator concerned. As far as it goes, I can see no fault in the way you are setting the VBA objects in your listing, but without knowing the Quick3270 object model I have no idea whether or not this is truly OK.

Questions:
Can you confirm that the emulator window appears on your screen after you create the object reference? Is it visible by default, or do you have to set it visible explicitly? Has the emulator been configured for you to access your mainframe? If not, would you expect to see characters echoed to the emulator screen if it is not connected - do you need to send some kind of control or escape sequence which sets the emulator off-line before you would see such characters?

-Stewart
Oct 27 '09 #2
NeoPa
32,556 Expert Mod 16PB
I doubt there'll be too many here with such specific experience I'm afraid. In such situations I generally recommend that you contact the providers of the system for help. Sometimes they have their own forums, otherwise see what technical support they offer.
Oct 27 '09 #3
ADezii
8,834 Expert 8TB
@SonOf27
Won't the Object Browser expose the Properties, Methods, and Events of the Quick3270 Type Library, and also provide assistance as far as their usage goes?
Oct 27 '09 #4
SonOf27
11
Thanks for responding guys.

Stewart, I have tried with the Quick3270 window already open and also explicitly set it to visible. When I set it to visible it continues to open new windows every time the program runs. Yes the emulator has been configured and I can log in and use it manually with no apparent problems. I need it to be online and logged in so I can key directly into CICS screen locations.

NeoPa, I would agree and have sent a similar question to them as well and am waiting for a responce.

ADezzi. Yes the Object Browser exposes the properties, methods and events. My VBA pannel even autocompletes the code as I type however it still does not do what I'm expecting it to do.

Thanks for your time guys, I will keep at it and hopefully find a solution
Oct 27 '09 #5
Hi SonOf27,

I'm only a few years late in replying you regarding your Quick3270 screen scraping question. Hope you don't mind. Below is a very simple test i did to logon in CICS. To run this, copy the function to your Excel or Access module, make a early binding to Quick 3270 Type Library. As a prerequisite, you also need a quick 3270 session started up. This function will log you in stay on your main menu. To use this function other then SonOf27's environment, customization is required.

Cheers,

Expand|Select|Wrap|Line Numbers
  1. Public Function SignOn(strUserID As String, strPass As String) As Boolean
  2.  
  3. ' Assumption: early binding to Quick3270 2.0 Type Library
  4.  
  5. Dim x As Quick3270.Quick3270
  6. Dim Q As Quick3270.ISession
  7.  
  8. Set x = Quick3270.Quick3270
  9.  
  10. x.Visible = True
  11. x.TimeoutValue = 500
  12. Set Q = x.ActiveSession
  13. If Not Q.Connected Then
  14.   MsgBox "Please start Q 3270 session."
  15. End If
  16.  
  17. Do While Not Q.Screen.WaitForString("USERID", 18, 2)
  18.   DoEvents
  19.   Sleep 1000
  20.  
  21.   ' implement exit strategy here
  22.  
  23. Loop
  24.  
  25. '
  26. Q.Screen.MoveTo 17, 33
  27. Q.Screen.PutString "MA"
  28. Q.Screen.SendKeys "<Enter>"
  29. Sleep 1000
  30.  
  31. ' Solve system NMGA
  32. Q.Screen.MoveTo 21, 40
  33. Q.Screen.PutString strUserID
  34. Q.Screen.SendKeys "<Tab>"
  35. Q.Screen.MoveTo 21, 64
  36. Q.Screen.PutString strPass
  37. Q.Screen.SendKeys "<Enter>"
  38. Sleep 1000
  39.  
  40. Do While Not Q.Screen.WaitForString("Command", 2, 2)
  41.   DoEvents
  42.   Sleep 1000
  43.  
  44.   If Q.Screen.GetString(2, 2, 13) = "Select Option" Then
  45.     Q.Screen.MoveTo 2, 21
  46.     Q.Screen.SendKeys "CC<ENTER>"
  47.     Exit Do
  48.   End If
  49. Loop
  50.  
  51. Q.Screen.MoveTo 7, 2
  52. Q.Screen.PutString "S"
  53. Q.Screen.SendKeys "<Enter><Enter>"
  54. Sleep 1000
  55.  
  56. Do While Not Q.Screen.WaitForString("CICS", 1, 26)
  57.   DoEvents
  58.   Sleep 1000
  59. Loop
  60.  
  61. Q.Screen.MoveTo 7, 24
  62. Q.Screen.PutString strUserID
  63. Q.Screen.SendKeys "<Tab>"
  64. Q.Screen.MoveTo 8, 24
  65. Q.Screen.PutString strPass
  66. Q.Screen.SendKeys "<Enter>"
  67.  
  68. If Q.Screen.GetString(32, 15, 29) = "OPID FYW Sign-on is complete." Then
  69.   Q.Screen.SendKeys "MAIN<ENTER><ENTER>"
  70. End If
  71.  
  72. MsgBox "You should now be on the Main Menu"
  73.  
  74. End Function
Aug 24 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris Shaw | last post by:
Can anyone help. I have an access database with a couple of thousand records in it ... :shock: problem is i need to type one of the fields values into a data entry window for another...
0
by: Baramuse | last post by:
Hi, I wonder how to get the mainwindow from a dialogbox or static class. Usually i use TopLevelControl (is that a good idea) to get the mainwindow from witch I can gain access to any...
20
by: Deano | last post by:
Just looking at C Sharp to see if it might be worth my while learning something new. Has anyone here tried a .NET language and tried to replicate a existing Access app? I would be interested to...
11
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got...
1
by: shsandeep | last post by:
I am able to connect to a Z/OS thru an AIX gateway, but when I try to do select 1 from sysibm.sysdummy1 I get the following error: SQL0551N "AOPSXS" does not have the privilege to perform...
3
by: pradeep | last post by:
Hi, I amnew to this group and lucky to have found this group. i have a master table which has different types of application say Desktop, Mainframes, etc. I have an individual table for each...
1
by: Gil Lapid | last post by:
Hi, What is the recommended way to develop DB2 Mainframe application without buying this expensive hardware/software ? I'd like to develop the software for a Mainframe customer. Thanks, ...
0
by: pnalla | last post by:
Hi, I am try to connect to mainframe screen using visulabasic6.0?. 1) Is it possible to connect vb to mainframe 2) Is there any interface or emulator is requried for this approach? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.