I was recently using UTL_FILE.PUT_LINE to write to a text file but realized that the carriage returns PUT_LINE adds were screwing my output up. So I changed the package to UTL_FILE.PUT but now it writes an empty file.... no data at all. I'm wondering if the usage for PUT is the same as it is for PUT.LINE. Here is a sample of my script with PUT instead of PUT_LINE (works fine with PUT_LINE but not with PUT):
This is from the documentation (always worth a read!):
When you call PUT_LINE, the item that you specify is automatically followed by an end-of-line marker. If you make calls to PUT to build a line, then you must add your own end-of-line marker by calling NEW_LINE. GET_LINE and GET_LINES do not return lines that have not been terminated with a newline character.