We use Kermit scripts to allow error trapping of ftp processes. Can't say it's 100% foolproof, but it's a big improvement. For example:

#!/bin/kermit +
set transfer display crt
if < \v(argc) 2 exit 1 Usage:  \%0 file
ftp open dest_computer /user:usernm /password:passwd
if fail exit 1 dest_computer: Connection failed
if not \v(ftp_loggedin) exit 1 Login failed
cd /where/the/local/copy/is
if fail exit 1 /where/the/local/copy/is \v(errstring)
ftp cd /where/to/put/it
if fail exit 1 ftp cd /where/to/put/it \v(ftp_message)
ftp put \%1
if fail exit 1 ftp put \%1: \v(ftp_message)
ftp bye
exit

If you log the output, you can quickly see "Why did last night's job fail?" The exit 1 also sets the @SYSTEM.RETURN.CODE for error trapping.

Best,
David Beahm

Daly, Mark wrote:

Anyone know if there's been talk about a callFTP function? That would be
nice to have.

Currently we're executing unix commands to ftp files around. But parsing the
output to determine whether or not the transfer was successful seems a bit
hap-hazard to me.

If anyone would care to share their ftp tricks and tips, I'd greatly
appreciate it.

Thanks,

Mark.
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to