Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change linefeed created by UTL_FILE? 1

Status
Not open for further replies.

BarbaraFuhrmann

Programmer
Aug 20, 2002
118
0
0
DE
Hello world,

here's my problem:

I have to build an txt-File that contains the input for another software. Each line contains 82 fields separated by '#'. As my oracle 8i database is running under linux (I suppose that this might be the reason for the deferring linefeeds) the linefeed is hex '0A'. The software, that shall process the generated file is running under MS Win2000 and needs hex 'OD OA'. (I figured this out by importing the file with Excel first and saving it as 'txt separated by tabs' without changing anything else. The following software could process the file afterwards.) Is there a solution how I can tell the UTL_FILE procedure to use this needed linefeed?

Thank you
Barbara
 
This is a common problem in unix/windows/dos environments. The simplest way to fix this is to run the unix2dos command in unix(linux) on your text file which will do the conversion for you. There is also dos2unix for the reverse.
The unix2dos command adds a CR whenever it encounters a LF character. If these are not available on your system you can run the commands on Windows to do the conversion. I have seen some internet sites offering freeware for windows versions of these small programs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top