Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FTP - HP and/or Reflection

48 views
Skip to first unread message

j_po...@sucaba.com

unread,
Nov 29, 2002, 1:16:17 PM11/29/02
to
I am working on a project to send an encrypted file by FTP and later to
retrieve a response file to my transmission. I have not begun to deal with
the encryption yet, just the sending/receiving; and I am running into some
problems.

I would like to automate as much of the process as possible and I have
tried two different approaches, each of which has been unsuccessful.

Approach 1 was to use FTP on the HP, since that is where the file to be
transmitted will be created. I think that when I first tried this it
worked (but my memory is hazy on this), but it definitely does not work
now. The site I am to transfer the file to is running WindowsNT, I
believe, and I here is a pseudo-recording of my FTP attempts from the HP.


JEP:run ftp.arpa.sys

File Transfer Protocol [A0009001] (C) Hewlett-Packard Co. 1990
ftp> open 999.999.9.9
220 hfszmftp001 Microsoft FTP Service (Version 5.0).
Connected to 999.999.9.9. (FTPINFO 40)
Name(jep): xxxxx
331 Password required for xxxx.
Password:
230-This system is a company resource maintained by yyyyy for business us
e. It contains information proprietary and confidential to yyyyy, its sup
pliers or customers and is protected under applicable copyright laws. You
acknow
ledge yyyyy's policies and right 230-udit nd monitor these systems at an
y time for any business purpose, consistent with applicable law.
**** Illegal instruction address (TRAPS 56).

ABORT: FTP.ARPA.SYS

Program terminated in an error state. (CIERR 976)


If it looks like there is some garbage in the middle of the blurb returned
following the entry of the password, there is; but I do not know what, if
anything, that means.

So, undaunted, I attempt to setup a couple of scripts and attach them to
toolbar buttons in WRQ's Reflection for HP v6.0. These scripts will handle
the sending and the receiving of files. The script to "send" a file will
first download the file from the HP, the use the FTPSendFile method to
transmit it to the recipient. The script to retrieve a file, will use the
FTPReceiveFile method to get the file, then will upload it to the HP.

I have only tested retrieving a file so far and while I do succeed in
getting connected, I get an error, "Unable to open file on FTP server" even
though there is a file there and I am using the correct name.

One additional piece of information: I have been successful in doing a
transfer in each direction by using WRQ's standalone FTP client. But to
make those transfers work, I must do a change directory command before
initiating the transfer. That is, I can not specify the fully qualified
name of the file to transfer, I must change to the directory where the file
resides first, then do the transfer.

I do not understand the reason for the requirement to change directory, but
worse, I can not see how one can do that and still use the WRQ FTP
methods. I do not find any "method" to change directory - it seems that
the FTPSendFile and FTPReceiveFile expect fully qualified file names.

Each of the two ways to send/receive a file have problems I do not know how
to solve.

1.) FTP from the HP: I do not know what is causing the error noted above,
but even if I solve that, I do not have a clue how I will encrypt the file
using a PGP certificate.

2.) FTP from a Reflection script: does not seem to be able to do a change
directory on the FTP target machine and I can not see how to send/receive
successfully without doing a change directory. I am also not sure yet how
I will get the file encrypted, but at least the PGP software for the PC is
affordable so I am planning to test this out.

The WRQ stand alone FTP client does have a scripting language and I am
currently beginning to test that to see if it can pick up the file from the
HP and send it to the destination and vice versa. But it seems to be older
technology and does not seem as user friendly as Reflection itself; and I
do not see, at the moment, that it will be able to get the file encrypted
(where I thought that Reflection itself might permit me to run some other
program to encrypt, or decrypt, a file).

If anyone can clear up any of the aforementioned problems or steer me to
some appropriate documentation, I would appreciate it. I am running
RELEASE: C.60.00 MPE/iX HP31900 C.16.01 USER VERSION: C.60.00 on a 969-
200.

Thanks.

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

Ian F

unread,
Dec 1, 2002, 6:31:25 PM12/1/02
to
j_po...@SUCABA.COM wrote in news:3de7...@skycache-news.fidnet.com:

Hello,

I am doing around the same thing with some of my year end report jobs and
such. I need to send the spoolfiles to an archiving company via ftp.

Here is the approach I took:

Just let the HP3000 generate the files.
Use a CMD script (or bat) to ftp the file(s) from the 3000 to your PC.
type ftp /? at the windows command prompt for more info.
Then transfer from your PC to the ftp server on the Internet. I did this
because my 3000 does not have an internet connection.
Use the command scheduler to schedule these actions to execute if
necessary.
I used a freeware windows command line mailer (BLAT) to send an email to
the admin on the other end to let him know that his files were there.

the command script looks like this:
FTP -i -s:ftpcommands.TXT ftp.dinosaur.hp3000.com
*put your pgp command here*
FTP -i -s:ftpcommand.TXT ftp.internethost.com
blat complete.txt -s "Your Subject here" -t reci...@archiving.com

the ftpcommands.txt file looks like this (Just like a stream file):
MGR.ACCOUNT Login
PASSWORD ftp Password
ASCII Set Xfer type
HASH Show me what you are doing
MGET multiplefile*.workfile.account Get all files from HP
MDEL multiplefile*.workfile.account Delete all files from HP
BYE Goodbye

If you need to encrypt the files before xfer, it will be simple as pgp has
a commandline interface as well. Do pgp /? for more info.

Of course I am sure an HP3000 hacker could get you to do all of this from
the MPE prompt with a little $middleware$ 'help'.

Only 3 more applications to convert from HP and Image to be free of all
proprietary and spaghetti code workarounds!

Chris Jolliffe

unread,
Dec 2, 2002, 3:46:39 AM12/2/02
to
Try this as an MPE command file....

ECHO ![CHR(%33)]H![CHR(%33)]J
setvar reflect, chr(27)+"&oB"
echo
echo FILE TRANSFER FOR REFLECTIONS
echo
echo ************************************************************
echo * THIS PROCESS WILL TRANSFER A FILE FROM THE HP TO YOUR PC *
echo ************************************************************
echo
setvar pc_filespec, ""
setvar hp_filename, ""
COMMENT
COMMENT Input filenames
COMMENT
echo Please Enter The PC/Network Path And Filename ie. C:\TEMP\FILE.TXT
echo
INPUT PC_FILESPEC, &
" >> "
if pc_filespec=""
return
endif
echo
echo Please Enter The Full HP File Name To Transfer. ie. TEST.PUB.SGA
echo
INPUT HP_FILENAME, &
" >> "
if hp_filename=""
return
endif
ECHO &
!REFLECT RECEIVE !PC_FILESPEC FROM !HP_FILENAME ASCII
INPUT MPE_COMMAND, ":"
RUN PCLINK3.PUB.SYS
input pass_or_fail
if pass_or_fail = "S"
echo
echo Your File Transfer Has Been Successful
echo
INPUT PAUSE, "<Press Return To Continue>"
else
echo
echo Your File Transfer Has FAILED !! Make Sure You Have Entered The
echo Correct PC/Network Path And The Full HP Filename. Reflections
echo Transfer Will Not Overwrite files. Make Sure The File Does
echo Not Already Exist On Your PC/Network Path.
echo
INPUT PAUSE, "<Press Return To Continue>"
endif

Chip Dorman

unread,
Dec 2, 2002, 4:16:17 PM12/2/02
to
Hi y'all,

In the spirit of "there is always another way to do something",
I offer this MPE command file we have been using to initiate
file transfers from our 3ks.

Enjoy,
Chip Dorman
Kennametal, Inc

HP2PC

PARM FNAM="*NOFILE*"
IF ("!FNAM" = "?") THEN
ECHO *************************************
ECHO ** HP2PC - Automated File Transfer **
ECHO ** from HP to logged on PC as **
ECHO ** ASCII transfer to TXT only. **
ECHO ** For use by those logged on **
ECHO ** under Reflection only. **
ECHO ** Called by either **
ECHO ** HP2PC - will prompt for name **
ECHO ** HP2PC [filename] **
ECHO ** Written by CDORMAN 000926 **
ECHO *************************************
RETURN
ENDIF
SETVAR ESC CHR(27)
SETVAR CR CHR(13)
IF ("!FNAM"="*NOFILE*" OR FINFO("!FNAM","EXISTS")) THEN
ECHO !ESC&oG
ECHO Function GetTempDir() As String
ECHO Dim s As String
ECHO Dim l As Long
ECHO s = Environ$("TEMP")
ECHO l = Len(s)
ECHO If (l = 0) Then
ECHO s = Environ$("TMP")
ECHO l = Len(s)
ECHO End If
ECHO If (l = 0) Then
ECHO GetTempDir = "C:\"
ECHO Else
ECHO GetTempDir = s & "\"
ECHO End If
ECHO End Function
ECHO Sub Main
ECHO Dim txtDLFile, CRLF, LocalFile, InputPrompt As String
ECHO Dim l As Long
ECHO CRLF = Chr$(13) & Chr$(10)
ECHO If ("!FNAM" = "*NOFILE*") Then
ECHO InputPrompt = "Enter the file to transfer" & CRLF & " FROM the HP..." & CRLF & "
TO your PC."
ECHO txtDLFile = UCase$(InputBox(InputPrompt, "File Name to Download?", "*NOFILE*"))
ECHO Else
ECHO txtDLFile = UCase$("!FNAM")
ECHO End If
ECHO l = Len(txtDLFile)
ECHO If (txtDLFile = "*NOFILE*" Or l = 0) Then Exit Sub
ECHO If (l > 8) Then
ECHO MsgBox "Sorry..." & CRLF & CRLF & txtDLFile & " is not a valid file name.", 64,
"Uh-Oh"
ECHO Exit Sub
ECHO End If
ECHO LocalFile = GetTempDir & txtDLFile & ".TXT"
ECHO Application.WRQReceiveFile LocalFile, txtDLFile, rcASCII, rcDelete
ECHO MsgBox txtDLFile & " was transferred to " & CRLF & CRLF & " " & LocalFile , 64, "WRITE
THIS DOWN!"
ECHO End Sub
ECHO !ESC&oH
ELSE
ECHO
ECHO !FNAM --- NOT FOUND ON HP
ENDIF

Mark Bixby

unread,
Dec 2, 2002, 4:31:17 PM12/2/02
to
Some FTP clients (including the MPE FTP client at various times in the past)
have trouble with "welcome" messages issued by the remote FTP server.

Ask whoever runs the FTP server if there is special username or password syntax
you can use to suppress the "230-" welcome message stuff for your connection.
IIRC some FTP servers let you specify a leading hyphen character in the
password to suppress the welcome stuff.

- Mark B.

j_po...@SUCABA.COM wrote:
> JEP:run ftp.arpa.sys
>
> File Transfer Protocol [A0009001] (C) Hewlett-Packard Co. 1990
> ftp> open 999.999.9.9
> 220 hfszmftp001 Microsoft FTP Service (Version 5.0).
> Connected to 999.999.9.9. (FTPINFO 40)
> Name(jep): xxxxx
> 331 Password required for xxxx.
> Password:
> 230-This system is a company resource maintained by yyyyy for business us
> e. It contains information proprietary and confidential to yyyyy, its sup
> pliers or customers and is protected under applicable copyright laws. You
> acknow
> ledge yyyyy's policies and right 230-udit nd monitor these systems at an
> y time for any business purpose, consistent with applicable law.
> **** Illegal instruction address (TRAPS 56).
>
> ABORT: FTP.ARPA.SYS
>
> Program terminated in an error state. (CIERR 976)

--
ma...@bixby.org
Remainder of .sig suppressed to conserve expensive California electrons...

0 new messages