Home » SQL & PL/SQL » SQL & PL/SQL » UTL_FILE file open modes (oracle10g)
UTL_FILE file open modes [message #398814] Fri, 17 April 2009 13:29 Go to next message
shrinika
Messages: 266
Registered: April 2008
Senior Member
Hello,

We have below file open modes in UTL_FILE.

r  - read mode
w  - write mode
a  - append mode
rb - read byte mode
wb - write byte mode
ab - append byte mode



I understand the file modes R,W,A. But i am not sure about RB,WB,AB modes. My understanding is,
RB/WB/AB mode reads/writes the content byte by byte. But regular R/W/A modes reads/writes the content
character by character.. Am i correct here? Please correct me i am wrong...
Re: UTL_FILE file open modes [message #398816 is a reply to message #398814] Fri, 17 April 2009 13:43 Go to previous messageGo to next message
BlackSwan
Messages: 25032
Registered: January 2009
Location: SoCal
Senior Member
substitute "binary" for "byte"; opposed to printable text
Re: UTL_FILE file open modes [message #398817 is a reply to message #398814] Fri, 17 April 2009 13:45 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
r,w,a are text files, so there are characters and lines.
"b" versions are binary files, so bytes and line is irrelevant, more meaningless.

Regards
Michel
Re: UTL_FILE file open modes [message #398818 is a reply to message #398817] Fri, 17 April 2009 14:22 Go to previous messageGo to next message
shrinika
Messages: 266
Registered: April 2008
Senior Member
Thanks Michel!!. What kind of binary file we can read/write/append by using rb,wb,ab modes..
Can you please give me one example for reading binary files.. I am still not sure at
what circumstances we can use these modes...
Please help me to understand more... I googled this and it only says byte mode

Thanks
Appreciated!!!
Re: UTL_FILE file open modes [message #398819 is a reply to message #398818] Fri, 17 April 2009 14:39 Go to previous message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
What kind of binary file we can read/write/append by using rb,wb,ab modes..

Anyone, image for instance or zip file...

Regards
Michel
Previous Topic: Convert Relational table into Hierarchical table
Next Topic: fetching evenly distributed records throughout the day
Goto Forum:
  


Current Time: Fri Dec 02 12:30:51 CST 2016

Total time taken to generate the page: 0.05222 seconds