Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Disconnect Session

Disconnect Session

Disconnect Session

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...


Extra!Personal Client
Do you want to disconnect session 'session name'?
How can I dispose of this message via code?


glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Disconnect Session

Could you share the code you use to launch extra, load a session, execute a macro, and how you closed it?

RE: Disconnect Session

sub Main()

    oSess.Visible = False
    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
        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)
            .Area(17, 28, 17, 28) = "S"
            .SendKeys ("<ENTER>")
        ' Login
            Do Until .WaitForCursor(14, 37)
            .Area(14, 37, 14, 46) = fOSUserName()
            .Area(15, 37, 15, 46) = vPassword
            .SendKeys ("<ENTER>")
        ' SuperSession
            Do Until .WaitForCursor(9, 2)
            .Area(11, 2, 11, 2) = "S"
            .SendKeys ("<ENTER>")
        ' IMS Ready
        End If
    End With

    If bContinue Then Exit Sub
    Set oScrn = Nothing
    Set oSess = Nothing
    Set oSystem = Nothing
End Sub

glassesDon't let the Diatribe...
talk you to death!tongue

glassesJust traded in my old subtlety...
for a NUANCE!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close