InfoConnect VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Terminal Object / StopTrace Method
Example
In This Topic
    StopTrace Method
    In This Topic
    Stops capturing incoming host data to a file and closes the trace file.
    Syntax
    expression.StopTrace() As ReturnCode
    where expression is a variable that represents a Terminal Object

    Return Value

    One of the following ReturnCode enumeration values.

    Member Description
    Cancelled Cancelled.
    Error Error.
    PermissionRequired Permission is required.
    Success Success.
    Timeout Timeout condition.
    Truncated The text is truncated.

    Example
    This sample shows how to capture incoming host data and save it to a file.
    Sub Trace()
        Dim rcode As ReturnCode
        Dim fName As String
        fName = Environ$("USERPROFILE") & "\Documents\Micro Focus\InfoConnect\Logs\r-log.rev"
        rcode = ThisTerminal.StartTrace(fName, TraceFileExistsOption_OverWrite, TraceFormatOption_TraceDefault)
        
        ThisScreen.SendKeys "demo"
        ThisScreen.SendControlKey ControlKeyCode_Enter
        
        rcode = ThisTerminal.StopTrace
    End Sub
    See Also