Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 and Rumba HLLAPI

Status
Not open for further replies.

GFrantsen

Programmer
Sep 16, 2002
37
US
HELP!
I need to intact with the open Rumba session but I'm not sure how to go about it. I DON'T want to use the Rumba ObjectX controls, just be able to read/write/effect the open Rumba session. I can't find any code showing me what I have to declare/call anywhere.
I know it involves the short-name (currently "A"). That's about all I know.

Help please!

Thanks.
Greg.
 
Greg,
Rumba actually runs from a tn3720 emulations system. What kind of emulation system are you using?. I have a lot of experince with HACL which is the Child of hllapi and ehllapi. Just post me some more info and we will begin. (it's not terribly easy or terribly hard)

Scoty
::) "Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
We are running Rumba mainframe and I know there is a way, using EHLLAPI to interact with the session. We DON'T want to use the controls. The app we need to run has no forms and just needs to drive the mainframe application, read it, etc.
I'm not too wild about using DDE, but I suppose if I have to, I have to. The thing is, at the place I worked a few years ago, we used EHLLAPI DLLs that someone wrote in C to push the Rumba session around. We called them from VB. We were using VB3 on Windows 3.11 machines.
I was hoping that the newer Rumba supported COM, or that EHLLAPI would somehow be easier with newer versions of VB.

All I really need is the code. Declares, etc. I think I can figure the rest out. I don't want to add any new DLLs or controls. We need to keep this as clean as possible.

Thanks.
 
I don't know how to push the rumba around. What I am referring to is the underlying emulation session. Ie. IBM Personal Communications ect. Things along that line. If you are using IBM the HACL I referred to is com all you need to do is declare the object. It may or may not help here is a module I came up with for HACL


Place in a module:

Code:
Option Explicit
Global psA As Object
Global psB As Object
Global psC As Object
Global psD As Object
Global psE As Object
Global psF As Object
Global OIAA As Object
Global OIAB As Object
Global OIAC As Object
Global OIAD As Object
Global OIAE As Object
Global OIAF As Object
Global E As String
Global C As String



Public Sub StartUp()
E = "[enter]"
C = "[clear]"
Set psA = CreateObject("PCOMM.autECLPS")
Set psB = CreateObject("PCOMM.autECLPS")
Set psC = CreateObject("PCOMM.autECLPS")
Set psD = CreateObject("PCOMM.autECLPS")
Set psE = CreateObject("PCOMM.autECLPS")
Set psF = CreateObject("PCOMM.autECLPS")
Set OIAA = CreateObject("PCOMM.autECLOIA")
Set OIAB = CreateObject("PCOMM.autECLOIA")
Set OIAC = CreateObject("PCOMM.autECLOIA")
Set OIAD = CreateObject("PCOMM.autECLOIA")
Set OIAE = CreateObject("PCOMM.autECLOIA")
Set OIAF = CreateObject("PCOMM.autECLOIA")
Connect
End Sub

Public Sub Connect()
psA.SetConnectionByName ("A")
psB.SetConnectionByName ("B")
psC.SetConnectionByName ("C")
psD.SetConnectionByName ("D")
psE.SetConnectionByName ("E")
psF.SetConnectionByName ("F")
OIAA.SetConnectionByName ("A")
OIAB.SetConnectionByName ("B")
OIAC.SetConnectionByName ("C")
OIAD.SetConnectionByName ("D")
OIAE.SetConnectionByName ("E")
OIAF.SetConnectionByName ("F")
End Sub

Public Function GetIt(PS As Object, Optional R As Long, Optional C As Long, Optional L As Long) As String
If R = 0 Then
    GetIt = PS.GetText
Else:
    GetIt = PS.GetText(R, C, L)
End If
End Function

Public Sub SendIt(PS As Object, Info As String, Optional R As Long, Optional C As Long)
'Public Sub SendIt(psName As String, PS As Object, Info As String, Optional R As Long, Optional C As Long)
Dim ErrorCount As Single

TryAgain:
Err() = 0
On Error GoTo MyModule_err
PS.SendKeys Info, R, C
    
'wait
    Select Case PS.Name
        Case "A"
            Do Until OIAA.InputInhibited = 0
            Loop
        Case "B"
            Do Until OIAB.InputInhibited = 0
            Loop
        Case "C"
            Do Until OIAC.InputInhibited = 0
            Loop
        Case "D"
            Do Until OIAD.InputInhibited = 0
            Loop
        Case "E"
            Do Until OIAE.InputInhibited = 0
            Loop
    End Select
MyModule_err:
    If Err() = -2147352567 Then
        If ErrorCount < 2 Then
            PS.SendKeys &quot;[reset]&quot;, 0, 0
            ErrorCount = ErrorCount + 1
            Resume TryAgain
        Else:
            MsgBox &quot;The emulator connection is locked&quot; & Chr(13) & &quot;Please check for the 'X <-8->' in the Op Info Area&quot; & Chr(13) & &quot;of emulator &quot; & PS.Name & &quot; and clear it&quot;
            'Quit_It
        End If
    End If

End Sub

Public Sub Enter(PS As Object)
'This will work to time by checking the upper left corner upper right corners to change
Dim lsUnTarget As String
lsUnTarget = GetIt(PS)
SendIt PS, E
Do Until GetIt(PS) <> lsUnTarget
DoEvents
Loop
End Sub[\code]

YOU WILL NEED TO call StartUp from your form load or Sub Main()
 &quot;Learn from others' mistakes. You could not live long enough to make them all yourself.&quot;
-- Hyman George Rickover (1900-86),
 
Do I need any special reference or controls?

I tried this code and I get the following error message:

&quot;ActiveX component can't create object&quot;

on this line of code:

&quot;Set psA = CreateObject(&quot;PCOMM.autECLPS&quot;)&quot;


BTW, thanks for all your help.
 
You need to have IBM Personal communications installed on your local system and it has to be at least v 4.3. I'm not sure of the other systems com or even if they excist.

Scoty ::)

BTW, np. Legacy intergration is a pain &quot;Learn from others' mistakes. You could not live long enough to make them all yourself.&quot;
-- Hyman George Rickover (1900-86),
 
Boy! This is frustrating.
Thanks for the help.
I'll figure it out somehow!

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top