I'm having some trouble with Net::FTP trying to ftp an oracle data
(which is in backup mode, so it's ok to copy). When I run FTP
interactively from DCL, I can get the file without problems. But when I
use Net::FTP, it tells me the file is locked, and exits. I'm not sure
why there's a difference, since I must be using the same ftp sofware in
both cases?
Here's a simple test case, and some debug output.
Any suggestions would be appreciated!
I'm running perl 5.005_03 on OpenVMS V7.1-2 with MultiNet V4.1 Rev B.
-----------------------------------------------------------
$ type tst.pl
#!/usr/local/bin/perl -w
use strict;
use Net::FTP;
my $df = 'DISK$DMS1:[ORACLE.DBSFILES.HSB1]TEMP01.DBS';
my $ftp_errors = 1;
my $ftp = Net::FTP->new("anode.lvl.pri.bms.com", Debug=>1 );
if (defined $ftp) {
if ( $ftp->login('orasbmgr','passwd') ) {
if ( $ftp->cwd('dbfiles') ) {
if ( $ftp->binary() ) {
my $gotfile = $ftp->get($df);
$ftp_errors = 0 if defined $gotfile;
}
}
}
}
print "error text: ", $ftp->message, "\n" if $ftp_errors;
$ftp->quit;
------------------------------------------------------------
$ perl tst.pl
Net::FTP: Net::FTP(2.53)
Net::FTP: Exporter
Net::FTP: Net::Cmd(2.16)
Net::FTP: IO::Socket::INET
Net::FTP: IO::Socket(1.1603)
Net::FTP: IO::Handle(1.1505)
Net::FTP=GLOB(0x638370)<<< 220 ANODE.LVL.PRI.BMS.COM MultiNet FTP Server
Process
V4.1(16) at Fri 18-Feb-2000 1:29PM-EST
Net::FTP=GLOB(0x638370)>>> user orasbmgr
Net::FTP=GLOB(0x638370)<<< 331 User name (orasbmgr) ok. Password,
please.
Net::FTP=GLOB(0x638370)>>> PASS ....
Net::FTP=GLOB(0x638370)<<< 230 User ORASBMGR logged into
DISK$APPLIC1:[ORASBMGR]
at Fri 18-Feb-2000 1:29PM-EST, job 10b8.
Net::FTP=GLOB(0x638370)>>> CWD dbfiles
Net::FTP=GLOB(0x638370)<<< 250 Connected to
DISK$APPLIC1:[ORASBMGR.DBFILES].
Net::FTP=GLOB(0x638370)>>> TYPE I
Net::FTP=GLOB(0x638370)<<< 200 Type I ok.
Net::FTP=GLOB(0x638370)>>> PORT 140,176,1,22,10,219
Net::FTP=GLOB(0x638370)<<< 200 Port 10.219 at Host 140.176.1.22
accepted.
Net::FTP=GLOB(0x638370)>>> RETR
DISK$DMS1:[ORACLE.DBSFILES.HSB1]TEMP01.DBS
Net::FTP=GLOB(0x638370)<<< 550 %RMS-E-FLK, file currently locked by
another user
ERROR IN FTP ROUTINES!
error text: %RMS-E-FLK, file currently locked by another user
Net::FTP=GLOB(0x638370)>>> QUIT
Net::FTP=GLOB(0x638370)<<< 221 QUIT command received. Goodbye.