Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP GET commands - Net::FTP 1

Status
Not open for further replies.

topmac

Programmer
Nov 7, 2005
17
US
Hi there,
I am using Net::FTP to connect to FTP on an IBM machine. Connection, dir, ls commands are working fine except GET command.

The error says "bad file descriptor"

The Key thing here is I need to configure the FTP connection with "QUOTE SITE BLKSIZE 220" and "QUOTE SITE LRECL 220" to GET or PUT any files on this IBM machine. I can't seem to figure out completely how to do that....!!

As of now, I learnt that in:
my $ftp = Net::FTP->new($host, Blocksize -> 220) could be done. But I even need the "QUOTE SITE LRECL 220".

Is there a way to do that.....!!

Any ideas would be greatly appreciated,

thanks is advance,
_Uday
 
Code:
my $ftp = Net::FTP->new($host, Blocksize -> 220)
looks like a typo. You need
Code:
my $ftp = Net::FTP->new($host, Blocksize[red]=>[/red]220)

I think that
Code:
my $ftp = Net::FTP->new($host, Blocksize=>220)
sets the local blocksize and that you should probably also then do
Code:
my $ftp = Net::FTP->new($host, Debug=>1, Blocksize=>220);
$ftp->site( 'BLKSIZE 220' );
$ftp->site( 'LRECL 200' );
to issue the relevent commands to the remote end.

You'll note that I've turned debugging on. This is generally helpful while debugging Net::FTP sessions.

Try that and see how you get on.

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Dear Uday,

if you still need some ideas about FTP on IBM, give me your e-mail and I'll send you my program for transferring.

Dobrin
 
Thanks a lot guys....
I'll try ideas presented by fishiface first and if I have any more questions, I'll send you my e-mail address Dobrin

Thanks again both of you for your replies.....
_Uday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top