Subject: | |
From: | |
Reply To: | |
Date: | Tue, 12 Aug 2003 10:28:44 +1000 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Tim,
We are on a N4000 with 7.5, but have used the following for ages on the
previous box (969).
We set "exitonerror" at the start of the ftp session and use the system
variables that are set by the ftp client - look up the hp documentation
for ftp for more info.
Here's one of the scripts that we use, with sensitive details suppressed.
It just does a dir listing.
==========================================
parm dir="" acct=""
option nolist
echo exitonerror > ftptemp
if ups("!acct") = "T"
echo open xxx >>ftptemp
echo user xxxxxxxxx xxxxxxxxx >>ftptemp
else
echo open xxx >>ftptemp
echo user xxxxxxxxx xxxxxxxxx >>ftptemp
endif
echo dir !dir >>ftptemp
echo quit >>ftptemp
run ftp.arpa.sys;stdin=ftptemp
echo
if ftplasterr <> 0
echo FTP Error !ftplastmsg
echo
endif
==========================================
>>> Tim Cummings <[log in to unmask]> 12/08/2003 06:17:56 am >>>
Because FTP never sets the JCW to FATAL we came up with a workaround to trap
failed FTP's transfers.
The following code used to work on our 987. Now on our new Nclass it seems
to be ignoring the exitonerror. Anyone had similar problems?
90 ftp> open DOLLY
91 220 Serv-U FTP-Server v2.5i for WinSock ready...
92 Connected to DOLLY (10.206.50.152). (FTPINFO 40)
93 ftp> user xxxx
94 331 User name okay, need password.
95 Password:
96 230 User logged in, proceed.
97 Remote system type is UNIX
98 ftp> :SETVAR FTP_OK FALSE
99 ftp> exitonerror
100 ExitOnError mode on. (FTPINFO 33)
101 ftp> bin
102 200 Type set to I.
103 ftp> put ../TRANSFER/t_tran2.dat t_tran2.dat
104 200 PORT Command successful.
105 150 Opening BINARY mode data connection for t_tran2.dat.
106 FTP/XL Unknown Error Detected. Error = 232
107 426 Data connection closed, receive file t_tran2.dat aborted.
108 ftp> :SETVAR FTP_OK TRUE
109 ftp> quit
110 221 Goodbye!
111 NE %IF FTP_OK
112 PURGE /NE/TRANSFER/t_tran2.dat
112 -----Purging /NE/TRANSFER/t_tran2.dat (7000000 sectors)
113 7000000 sectors (1709 megabytes) saved
114 NE %ENDIF
Thanks,
Tim Cummings
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
"This e-mail message is intended only for the addressee(s)
and contains information which may be confidential. If
you are not the intended recipient please advise the
sender by return email, do not use or disclose the
contents, and delete the message and any attachments
from your system. Unless specifically indicated, this
email does not constitute formal advice or commitment
by the sender or UniSuper (ABN 54 006 027 121) or its
subsidiaries."
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|