Disconnect Session
Disconnect Session
(OP)
I am running VBA in Excel, an unattended process, where I create an Extra System object, a session, a screen, log in to an IMS session on the mainframe, do stuff, then...
here's where I am experiencing my "opportunity."
When I
I get a 'Yes/No' message box...
here's where I am experiencing my "opportunity."
When I
CODE
oSystem.Quit
How can I dispose of this message via code?Quote:
Extra!Personal Client
Do you want to disconnect session 'session name'?
Skip,Just traded in my old subtlety...
for a NUANCE!
RE: Disconnect Session
I got a response from DaveInIowa that helped me to solve this problem, thread707-1519452: Disconnect A Session.
Make the SESSION Visible property FALSE.
Then Quit the System object.
Skip,
Just traded in my old subtlety...
for a NUANCE!
RE: Disconnect Session
RE: Disconnect Session
sub Main()
IMS_Login
Step2
oSess.Visible = False
oSystem.Quit
Set oScrn = Nothing
Set oSess = Nothing
Set oSystem = Nothing
End sub
Sub IMS_Login(Optional bContinue As Boolean = True)
Dim bLogin As Boolean
Set oSystem = CreateObject("Extra.System")
sPath = "C:\Program Files\E!PC\65Backup\Sessions"
sFile = "MVSB1 Session1.EDP"
If oSystem.Sessions.Count = 0 Then
Set oSess = oSystem.Sessions.Open(sPath & "\" & sFile)
' ufmPassword.Show
bLogin = True
Else
Set oSess = oSystem.ActiveSession
bLogin = False
End If
With oSess
.Visible = True
.WindowState = xNORMAL
End With
Set oScrn = oSess.Screen
If (oScrn Is Nothing) Then GoTo ExitMacro
oSystem.TimeoutValue = 100
With oScrn
If bLogin Then
' BHT SignOn
Do Until .WaitForCursor(17, 28)
DoEvents
Loop
.Area(17, 28, 17, 28) = "S"
.SendKeys ("<ENTER>")
' Login
Do Until .WaitForCursor(14, 37)
DoEvents
Loop
.Area(14, 37, 14, 46) = fOSUserName()
.Area(15, 37, 15, 46) = vPassword
.SendKeys ("<ENTER>")
' SuperSession
Do Until .WaitForCursor(9, 2)
DoEvents
Loop
.Area(11, 2, 11, 2) = "S"
.SendKeys ("<ENTER>")
' IMS Ready
End If
End With
ExitMacro:
If bContinue Then Exit Sub
Set oScrn = Nothing
Set oSess = Nothing
Set oSystem = Nothing
End Sub
Skip,
Don't let the Diatribe...![[tongue] tongue](https://www.tipmaster.com/images/tongue.gif)
Just traded in my old subtlety...
talk you to death!
for a NUANCE!