HP3000-L Archives

October 2003, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tom Hula <[log in to unmask]>
Reply To:
Date:
Tue, 7 Oct 2003 16:57:52 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (159 lines)
I am using Reflection 10.0 on a WinXP box, doing various VB
scripts to transfer file to and from the HP3000. At least one
particular script has the habit of occasionally putting out a
run time error of 10069 (Reflection is busy). When I End
out of that, the r1win.exe process stays out there on the
WinXP box and consumes 100% of the cpu. If I start up
another script, it starts up another instance of r1win.exe
and that one may or may not get stuck out there as well.
The operator notices when they try to switch to other
applications and notice how slow the PC has become. They
are going into the Task Manager and ending the task(s).

Any ideas as to how I could stop this from happening?
I've changed around the errorhandling routine several
times with no luck. Here is the script:

Sub Convert_Cut_File()
' Generated by the Reflection Macro Recorder on 07-09-2003 10:50:33.62.
' Generated by WRQ Reflection for HP 10.0.
'
' copy PNL file from PC to HP3000, run program to insert commas between
' fields, and copy back to PC with PNX suffix
'
    On Error GoTo ErrorHandler

    Dim username As String
    Dim password As String
    Dim cutfile As String
    Dim fullcutfile As String
    Dim newcutfile As String

    Const NEVER_TIME_OUT = 0

    Dim LF As String    ' Chr$(rcLF) = Chr$(10) = Control-J
    Dim CR As String    ' Chr$(rcCR) = Chr$(13) = Control-M

    LF = Chr$(rcLF)
    CR = Chr$(rcCR)

    username = "HELLO XXX,XXX.XXX"
    ' Password was removed from this macro for security.
    ' Prompt for (what is assumed to be) a password.
    password = Session.GetPassword( _
        Prompt:="ENTER ACCOUNT (XXX) PASSWORD:", _
        HostUserName:=username)
    If password = "" Then Exit Sub
    cutfile = Session.InputBox( _
        Prompt:="Enter PNL file name - for CTS.PNL just type in CTS:")
    fullcutfile = "C:\Pcplus\" & cutfile & ".pnl"
    newcutfile = "C:\Pcplus\" & cutfile & ".pnx"
    
    With Session
        If .Connected = False Then
            .ConnectionType = "TELNET"
            .ConnectionSettings = "Host 192.168.1.7"
            .ConnectionSettings = "ExitOnDisconnect True"
        End If
        If .Connected = False Then
            .Connect
        End If

        .StatusBar = "Waiting for Prompt: MPE/iX:"
        .WaitForString "MPE/iX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit username & CR

        .StatusBar = "Waiting for Prompt: ENTER ACCOUNT (XXX) PASSWORD:"
        .WaitForString LF & "ENTER ACCOUNT (XXX) PASSWORD:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit password, rcDecodePassword
        .Transmit CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "MPEX" & CR
        
        .StatusBar = "Waiting for Prompt: %"
        .WaitForString LF & "%", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "ERASE CUTFILE.PUB;YES" & CR
        
        .StatusBar = "Waiting for Prompt: %"
        .WaitForString LF & "%", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "ERASE CUTOUT.PUB;YES" & CR
        
        .StatusBar = "Waiting for Prompt: %"
        .WaitForString LF & "%", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "EXIT" & CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .WRQSendFile fullcutfile, "CUTFILE.PUB", rcASCII, rcAppend, , , , "RECSIZE=233"
        .CommitLoginProperties
        .TransferIfFileExistsDefault = rcAppend
        .WRQHostRecordSize = 233
        .Transmit "IF FINFO('CUTFILE.PUB', 'BYTEFILESIZE') > 0 THEN" & CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "FILE CUTIN = CUTFILE.PUB" & CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "FILE CUTOT = CUTOUT.PUB,OLD;DEV=DISC" & CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "RUN B08IB10.Y2KPRG.P" & CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .Transmit "ENDIF" & CR
        
        .StatusBar = "Waiting for Prompt: PUB.XXX:"
        .WaitForString LF & "PUB.XXX:", NEVER_TIME_OUT, rcAllowKeystrokes
        .WaitForHostTrigger
        .StatusBar = ""
        .TransferIfFileExistsDefault = rcPurge
        .WRQShowRecordSize = True
        .WRQShowRecordSize = False
        .WRQReceiveFile newcutfile, "CUTOUT.PUB", rcASCII, rcAskUser
        .CommitLoginProperties
        .Transmit "BYE" & CR
        
        .WaitForString LF & "CPU=", NEVER_TIME_OUT, rcAllowKeystrokes
    Exit Sub

ErrorHandler:
    .MsgBox Err.Description, vbExclamation + vbOKOnly
    End With
End Sub



Tom Hula
Victor S. Barnes Company

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2