Connect to Mainframe

  • Thread starter Sridhar Pentlavalli via AccessMonster.com
  • Start date
S

Sridhar Pentlavalli via AccessMonster.com

Hi

I have a macro in which MS Access is connecting to mainframe to execute
some host commands. The code is as follows.

Can anybody help me in finding out what MyHost.TextRC returns. The
prerequisite to execute this code is, user has to open a mainframe session
and must open a CICS panel FE51. Please mail me if I am unclear in any
stage. I need to engance this tool with an immediate requirement.

Public Sub FE51_Booking()

Dim HostExplorer As Object
Dim MyHost As Object
Dim rs As Recordset
Dim iPSUpdateTime

Set HostExplorer = CreateObject("HostExplorer")
Set MyHost = HostExplorer.HostFromProfile("Session_A")

Set dbMIF = CurrentDb
Set rs = dbMIF.OpenRecordset("tblFE51Temp")

If MyHost.TextRC(1, 12, 4) <> "FE51" Then
MsgBox "Please start transaction FE51 first "
Exit Sub
End If

Do Until rs.EOF
MyHost.RunCmd ("Pf5")
MyHost.WaitPSUpdated iPSUpdateTime, True

MyHost.Keys (rs![BP Id].Value)
MyHost.RunCmd ("Tab")

If MyHost.TextRC(22, 2, 5) <> "I0219" Then
MsgBox "Something is wrong with this booking"
Exit Sub
End If
Loop

End

Thanks for the help
Sridhar P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top