Home » SQL & PL/SQL » SQL & PL/SQL » How to suppress messages from FTP server? (11.2)
How to suppress messages from FTP server? [message #650716] Sun, 01 May 2016 18:42 Go to next message
YIMORAF
Messages: 2
Registered: April 2016
Junior Member
Hi,
I am using Oracle PL/SQL's UTL_TCP feathers. I use the following to connect to an FTP site by supplying
it with certain parameters:

Utl_Tcp.Open_Connection(Remote_Host => Insite,

Remote_Port => Inport,

Out_Buffer_Size => Tout_Buffer_Size,

Tx_Timeout => Ttimeout);


But the issue is, if the vendor site returns a lot of messages, this code can't handle it, it errors out.
So i did some research, if i connect to this same FTP site using Command Prompt (cmd), then if i use
this: ftp -v, then this would suppress the messages. But i don't know how to accomplish this using UTL_TCP functions. I did some research but still unable to do this successfully. Could someone please shed some light?

Thank you,
Cathy
Re: How to suppress messages from FTP server? [message #650718 is a reply to message #650716] Sun, 01 May 2016 19:15 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
since you insist on reinventing the wheel, the URL is the complete specification for the FTP protocol.
http://www.faqs.org/rfcs/rfc959.html
you will have to program the "-v" capability into your procedure.

Welcome to this forum.

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read



Re: How to suppress messages from FTP server? [message #650747 is a reply to message #650718] Mon, 02 May 2016 20:50 Go to previous messageGo to next message
YIMORAF
Messages: 2
Registered: April 2016
Junior Member
Thank you for our reply..

I did more research, I guess there is no direct way to do something similar to typing "ftp -v" at the command line using UTL_TCP. But i think by making the in_buffer_size in the Open_Connection procedure to be 0 may be the right path to take. This way i think it will not allow any messages from the server.
Can you advise if this is correct?

Utl_Tcp.Open_Connection(Remote_Host => Insite,
Remote_Port => Inport,
Out_Buffer_Size => Tout_Buffer_Size,
in_buffer_size => 0,
Tx_Timeout => Ttimeout);
Thanks,
Re: How to suppress messages from FTP server? [message #650775 is a reply to message #650747] Tue, 03 May 2016 06:25 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
YIMORAF wrote on Mon, 02 May 2016 20:50
But i think by making the in_buffer_size in the Open_Connection procedure to be 0 may be the right path to take. This way i think it will not allow any messages from the server.
Can you advise if this is correct?


What does your own testing reveal?

Even if does do what you expect, I'd strongly advise against trying to suppress feedback from any API. That's a sure way to make your own code blind and mute. It's lousy programming.
Re: How to suppress messages from FTP server? [message #650779 is a reply to message #650775] Tue, 03 May 2016 10:18 Go to previous message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
And, of course, the solution to the problem would be highly dependant on what exactly "it errors out" means.
Previous Topic: Alphanumeric Sequence Generator
Next Topic: ORA-30928: Connect by filtering phase runs out of temp tablespace 30928. 00000 - "Connect by filter
Goto Forum:
  


Current Time: Thu Mar 28 17:26:05 CDT 2024