BrianWren
asked on
Send CR/LF using UTL_FILE?
Using UTL_FILE, how can I send a carriage-return/line-feed set (0x0d 0x0a) to a file?
Everything I try sends the 4 characters '13' and '10'.
Everything I try sends the 4 characters '13' and '10'.
You can use the one defined in UTL_TCP package: UTL_TCP.CRLF
Hi,
Use UTL_FILE.PUT_LINE
actually there are 2 method UTL_FILE.PUT to print the line on the same line and UTL_FILE.PUT_LINE to print the line and and line break.
Thx
Use UTL_FILE.PUT_LINE
actually there are 2 method UTL_FILE.PUT to print the line on the same line and UTL_FILE.PUT_LINE to print the line and and line break.
Thx
BrianWren, you can PUT and PUT_LINE. However, there is a different:
Use of PUT_LINE will flush the buffer to file and generate a new line
PUT just puts tring to the buffer. You then need to use FFLUSH to generate a carriage return and flush the contents the buffer to the file after using the UTL_FILE.PUT procedure.
You also can use PUTF()
Hope this helps
Use of PUT_LINE will flush the buffer to file and generate a new line
PUT just puts tring to the buffer. You then need to use FFLUSH to generate a carriage return and flush the contents the buffer to the file after using the UTL_FILE.PUT procedure.
You also can use PUTF()
Hope this helps
ASKER
I actually asked the wrong question...
(End of a long day...)
What I want to know how to do is send a form feed, 0x0C.
(I fooled myself as well. I really did try to manually write 0x0D 0x0A to a file.
I actually have been using PUT_LINE, and came to this point where I need to
generate a page.)
aHEm...
¯¯
Using UTL_FILE, how can I send a form-feed (0x0c) to a file?
I really apologize for being boneheaded.
If anyone has an answer to the way to send a FormFeed, i'd really like to know the answer.
(End of a long day...)
What I want to know how to do is send a form feed, 0x0C.
(I fooled myself as well. I really did try to manually write 0x0D 0x0A to a file.
I actually have been using PUT_LINE, and came to this point where I need to
generate a page.)
aHEm...
¯¯
Using UTL_FILE, how can I send a form-feed (0x0c) to a file?
I really apologize for being boneheaded.
If anyone has an answer to the way to send a FormFeed, i'd really like to know the answer.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
CHR() was what I needed to know.
I am a VB programmer, so I knew about CHR(), but I thought Oracle's substitute for that was TO_CHAR(), and I could find no way to make TO_CHAR() act like Chr$() [from VB].
Thanks!
I am a VB programmer, so I knew about CHR(), but I thought Oracle's substitute for that was TO_CHAR(), and I could find no way to make TO_CHAR() act like Chr$() [from VB].
Thanks!
Did you try this?
utl_file.putf(out_file,'\n
Thanks
Mohan