Hi fellow list members,
I have a script file (RFT, appended below) that transfers file from an
HPe3000/979-200 (MPE/iX 6.5) to a PC (Windows 98SE) using Reflection for HP
(Version 7.0+). RFT does some validation and then sends (echo's) an RBS
script to Reflection. It has been working fine, when invoked at the colon
(:) prompt, without any problems.
We then had the requirement for a PowerHouse Quick (8.19c5) screen to be
able to copy a file from the HP to a PC. So instead of writing something new
we added a 'run command' to the screen to invoke RFT with the needed
parameters. At the time no problem was anticipated.
All attempts to make it work have failed. The RBS code is invoking the error
handler when it is executing the WRQReceiveFile method. It is displaying the
error '10032 -- No response from host transfer program'. I did some checking
and the only difference in the environments at the time WRQReceiveFile was
invoked involved that HP type-ahead. At the colon prompt it was disabled,
and in Quick it was enabled. I added code to into the script to handle this
but it still made no change.
Any ideas?
regards,
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Robert W.Mills (Systems Development Manager) |
|Windsong Services, St. Mary Cray, ENGLAND |
|Tel : +44 (0)1689 870622 x3005 |
|Fax : +44 (0)1689 899026 |
|Email: [log in to unmask] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
++++ start of script.
parm hpfile='?', pcfile='', folder='', drive='', ftm='ASCII', exists='ASK'
if lft('!hpfile',1) = '?' then
setvar s chr(14)
setvar b chr(14)+':'+chr(15)
echo
![s+'R;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
echo ![b+' RFT - HPe3000 to PC File Transfer via Reflection.']
echo
![s+'5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
echo ![b+'']
echo ![b+' Syntax:']
echo ![b+' RFT hpfile[, pcfile, folder, drive, ftm, exists]']
echo ![b+'']
echo ![b+' Parameters:']
echo ![b+' hpfile Name of file on HPe3000 to be transfered.']
echo ![b+' pcfile Name of file on PC (default: hpfile)']
echo ![b+' folder Destination folder on the PC.']
echo ![b+' Note: Surround in double-quotes if it contains
spaces.']
echo ![b+' drive Destination drive on the PC (default: H)']
echo ![b+' ftm File Transfer Method to be used.']
echo ![b+' Options are: ASCII (default), BINARY and LABELS']
echo ![b+' exists Specifies what to do if file already exists on the
PC.']
echo ![b+' Options are: ASK (default) and DELETE']
echo ![b+'']
echo ![b+' Restrictions:']
echo ![b+' WRQ Reflection (v6 and newer).']
echo ![b+'']
echo
![s+'F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
#
# Author: Robert W.Mills
#
# Modification History can be found at the end of this file.
#
deletevar s, b
return
endif
if not finfo('!hpfile','exists') then
echo ERROR: HPe3000 file (![ups('!hpfile')]) does not exist -- TRANSFER
ABORTED
return
endif
setvar rft_hpfile ups('!hpfile')
if '!pcfile' <> '' then
setvar rft_pcfile ups('!pcfile')
else
setvar rft_pcfile '!rft_hpfile'
endif
setvar rft_folder '!folder'
if rht('!folder',1) <> '\'
setvar rft_folder '!folder\'
endif
if '!drive' <> '' then
setvar rft_drive lft(ups('!drive'),1)+':\'
else
setvar rft_drive 'H:\'
endif
setvar rft_ftm ups('!ftm')
if pos('|![lft("!rft_ftm",1)]|','|A|B|L|') = 0 then
echo ERROR: Requested file transfer method (!rft_ftm) not recognised.
return
endif
setvar rft_exists ups('!exists')
if pos('|![lft("!rft_exists",1)]|','|A|D|') = 0 then
echo ERROR: Requested PC file exists action (!rft_exists) not recognised.
return
endif
if HPTYPEAHEAD then
setvar rft_hptypeahead true
setvar HPTYPEAHEAD false
else
setvar rft_hptypeahead false
endif
#---- Start of Reflection code.
echo ![chr(27)]&o2G
echo Const REMOTE_FILE = "!rft_hpfile"
echo Const LOCAL_FILE = "!rft_pcfile"
echo Const TRANSFER = " File Transferred : !rft_hpfile To
!rft_pcfile"
echo Const DIALOG_TITLE = "HPe3000 to PC File Transfer v01.05"
echo Const INST_LINE_1 = " Select a folder and press the [OK]
button"
echo Const INST_LINE_2 = " OR -- Press the [Cancel] button to exit."
echo Const CANCELLED = " Transfer has been cancelled by user."
echo Const DESTINATION = " Destination Folder : "
echo Const ERROR_L1 = " Please contact the Help Desk on x3014 and tell
them:"
echo Const ERROR_L2 = " An error occured in RTF.CMD.SYSTEMS during the
download."
echo Const ERROR_L3 = " Reflection reports "
if lft('!rft_exists',1) = 'D' then
echo Const IF_FILE_EXISTS = rcDelete
else
echo Const IF_FILE_EXISTS = rcAskUser
endif
if '!rft_ftm' = 'L' then
echo Const TRANSFER_TYPE = rcLabels
echo Const METHOD = " File Transfer Method : LABELS(WRQ)"
elseif '!rft_ftm' = 'B' then
echo Const TRANSFER_TYPE = rcBinary
echo Const METHOD = " File Transfer Method : BINARY"
else
echo Const TRANSFER_TYPE = rcAscii
echo Const METHOD = " File Transfer Method : ASCII"
endif
echo Function BrowseForFolder$
echo Dim InstLines$
echo InstLines$ = INST_LINE_1 & Chr$(rcCR) & INST_LINE_2
echo BrowseForFolder$ = Application.GetFolderName(DIALOG_TITLE,
InstLines$, "!rft_drive")
echo End Function
echo Sub Main
echo Dim Folder$
echo Dim ErrorMsg$
echo ErrorMsg$ = ERROR_L1 & Chr$(rcCR) & Chr$(rcCR) & ERROR_L2 &
Chr$(rcCR) & ERROR_L3 & Chr$(rcCR)
if '!folder' = '' then
echo Folder$ = BrowseForFolder$
echo If Folder$ = "" Then
echo MsgBox CANCELLED, 64, DIALOG_TITLE
echo Exit Sub
echo End If
else
echo Folder$ = "!rft_drive!rft_folder"
endif
echo With Application
echo If Right(Folder$,1) <> "\" Then
echo Folder$ = Folder$ + "\"
echo End If
echo On Error GoTo ErrorHandler
echo .WRQReceiveFile Trim$(Folder$+LOCAL_FILE), REMOTE_FILE,
TRANSFER_TYPE, IF_FILE_EXISTS
echo On Error GoTo 0
echo MsgBox TRANSFER & Chr$(rcCR) & DESTINATION & Folder$ & Chr$(rcCR) &
METHOD, 64, DIALOG_TITLE
echo .Transmit Chr$(rcCR)
echo End With
echo Exit Sub
echo ErrorHandler:
echo MsgBox ErrorMsg$ & " [" & Str$(err) & " -- " & Error$(err) & "]",
16, DIALOG_TITLE
echo End Sub
echo ![chr(27)]&oH
#---- End of Reflection code.
if rft_hptypeahead then
setvar HPTYPEAHEAD true
endif
deletevar rft_@
return
#-- DO NOT ENTER EXECUTABLE CODE AFTER ABOVE 'RETURN' STATEMENT.
Modification History:
Versn | Date | Who | Reason for Change
------+------------+-----+------------------------------------------
01.00 | 07/03/2001 | RWM | Initial version.
| | | Based on TRANSFER command file written
| | | by Eben Yong (Health Plan of San Mateo)
01.01 | 12/03/2001 | RWM | Allow user to select name to be used for
| | | PC file (defaults to HP filename).
01.02 | 20/03/2001 | RWM | Added Drive parameter (defaults to H:\).
01.03 | 22/03/2001 | RWM | Added error file transfer handling.
01.04 | 19/04/2001 | RWM | Enhanced file transfer error nessage.
01.05 | 18/05/2001 | RWM | Disable type ahead during run if set.
#===================================================================
# End of command file.
#===================================================================
++++ end of script.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|