[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ftp_get local file question
Sender: "Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx>
Scott,
-------original message-----------
> Sender: Scott Klement <klemscot@xxxxxxxxxxxx>
> Alan,
> Getting the output, or better yet, sniffing the TCP connection, of a
> working FTP client might help me to understand what needs to be done.
> But, I don't have access to a system that uses this GDG scheme, so
> I can't get the output, AND even if I could, I'd have no way to test
> any code that I wrote.
> Plus, I'm really short on time right now.
maybe i can help. can you give me just a little direction (i.e. which of
your apis, and where I should look to 'sniff' the ibm ftp server perhaps?
I'm not flush with time, but I really want to get this thing working, so
maybe i can do the legwork for you.
plus, i'm having a conversion problem. i'm getting junk when I get a file
using the ftp_apis if I do the transfer manually (ibm client), it works
fine.
here are the manual commands vs. the apis that I'm using and the messages I
get in reply:
manually - after login...
> sendpa 0
SENDPASV is off.
> locsite namefmt 1
Client NAMEFMT is 1.
> cd "'FASKNS01'"
250 "FASKNS01." is the working directory name prefix.
> get TSP.FF01.P0SPDOU4.IASKNS.G0002V00 /http/occ/clearedchecks.txt
200 Port request OK.
125 Sending data set FASKNS01.TSP.FF01.P0SPDOU4.IASKNS.G0002V00 FIXrecfm 80
250 Transfer completed successfully.
14022 bytes transferred in 2.829 seconds. Transfer rate 4.956 KB/sec.
quit
This works great. file is in ascii, and is readable.
when I use the ftpapis,
in order - after login:
ftp_passiv(0)
ftp_chdir(ftp:'FASKNS01')
ftp_get(ftp:TSP.FF01.P0SPDOU4.IASKNS.G0002V00:/http/occ/clearedchecks.txt)
ftp_quit(ftp)
here is what is in the joblog:
> CWD 'FASKNS01'
250 "FASKNS01." is the working directory name prefix.
> SIZE TSP.FF01.P0SPDOU4.IASKNS.G0002V00
501 command aborted -- FTP server not configured for SIZE
> TYPE A
200 Representation type is Ascii NonPrint
> PORT 205,243,79,227,234,64
200 Port request OK.
> RETR TSP.FF01.P0SPDOU4.IASKNS.G0002V00
125 Sending data set FASKNS01.TSP.FF01.P0SPDOU4.IASKNS.G0002V00 FIXrecfm 80
250 Transfer completed successfully.
> QUIT
221 Quit command received. Goodbye.
and I get junk.
I've also tried inserting both ftp_binary(1) and ftp_binary(0), before the
ftp_passiv() function. the only difference in the job logs for these tries
is:
> TYPE I
200 Representation type is Image
for the binary(1) try. the binary(0) try was the same.
any ideas?
thanks,
Rick
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------