Unix linebreaks with Windows UTL_FILE

Hi there,
I have a problem writing linebreaks using the UTL_FILE package. Here's my code:
utl_file.put_line (lv_file_handle, 'First row');
utl_file.put (lv_file_handle, 'Second row' || chr(10));
utl_file.put (lv_file_handle, 'Third row' || chr(13) || chr(10));
The result is
First row CRLF
Second row CRLF
Third row CRCRLF
I'm running 10.1.0.2 on Windows 2003. I guess the translation from LF to CRLF is some sort of "feature", but as I want to generate shell scripts for Linux, I really don't like it.
Does anyone know how to control this kind of behaviour?
Thanx in advance, mc

Nobody answers? I wonder whether nobody cares about this problem or whether nobody knows the answer. Anyway, here's the solution:
As far as I know, it is not possible to change or disable the default linebreak, it is alway "OS specific" and thus always CRLF on Windows :(
But I found a workaround:
- Open the file in binary mode ("wb")
- Convert the output string to raw using UTL_RAW.CAST_TO_RAW
- Use UTL_FILE.PUT_RAW to write the string into the file
This works just fine.

Similar Messages

  • How to run import from Unix Oracle 8.0.5 database with Windows Oracle client?

    How to run import from Unix Oracle 8.0.5 database via network with Windows Oracle client? Is it possible? When I try to do it Oracle client just hangs... If not which ones are compatible Aix or Solaris to Unix or it must be a Unix client to connect to Unix Oracle database. Thank's for any help.

    Hi,
    In our project we are using this type. Since in this project server in UNIX(DEC) and client is running on windows. We have created a listener which always listen requests from client and doing the according to the request.
    Step1. create a request table, where u are inserting ur request.
    step2. create PRO*C proram, which is listening request on the table. If there is any request, call the imp (executable). This is happening on server side.
    Benifit. U can make a request from cleint and ftp the file client sit.
    Are u interested in more details and code, pls send a mail to me
    ---- Boby Jose Thekkanath
    [email protected]
    Dharma Computers(p) Ltd. Bangalore.
    null

  • Replace Mac line breaks with Windows linebreaks?

    Is there a simple AppleScript that could process a plain text file created on a Mac and replace the line breaks with Windows-compatible \r\n line breaks?
    I thought this would be a very simple task but have been searching for quite a while and can't find anything.
    Thanks.
    Paul

    There are several approaches to this. Here's one of them:
    set theFile to (choose file)
    set MacText to paragraphs of (read theFile)
    set {oldDelims, my text item delimiters} to {my text item delimiters, (return & linefeed)}
    set WindowsText to MacText as text
    set my text item delimiters to oldDelims
    set outputFile to (open for access theFile with write permission)
    set eof outputFile to 0
    write WindowsText to outputFile
    close access outputFile
    To explain, the first line asks you to choose the file in question - you could use any technique to identify the file, including hard-coding the path or using a drag-and-drop handler.
    The second line gets the current paragraphs and calls them 'MacText'
    The third line saves the current text item delimiters in oldDelims and sets the new text item delimiters to the CR+LF combination.
    The fourth line performs the magic of transforming the file. It does this by coercing the list of paragraphs (obtained in line 2) into a single text block, and it inserts the current text item delimiters between each text item, miraculously giving you CRLF-terminated paragraphs.
    The fifth line restores the text item delimiters to whatever they were before (you don't know what they were, but don't need to know what they were, as long as you restore the previous setting - it's unlikely you want CRLF moving forwards).
    The rest of the script (lines 6 through 9) reopen the file you originally selected, sets the EOF to 0 (effectively wiping the file contents), then writes the CRLF-terminated text to the file and finally closes the file.
    Note that some people might suggest using text item delimiters to break up the original text file on CRs but that would be wrong IMHO. The reason is that 'paragraphs of' can detect and handle both CR and CRLF-terminated paragraphs, leaving you with clean paragraphs into which you insert CRLFs.
    This means that if the file originally had CRLF-terminated paragraphs you'd end up with the same data, but at least there was no harm done.
    In contrast, if you simply searched for CRs and replaced them with CRLFs you could have the situation where you selected a CRLF-terminated file (maybe you didn't realize it was already in the Windows format) and your script would blindly replace each CR with CRLF, meaning you'd end up with CRLFLF combinations, which is very wrong.

  • How do you use the wdeploy tool in iPlanet Web Server with Windows 2000 Server?

    I found this on the knowledge base, but only described how to use this with Unix. Does this work with Windows? How do you set the IWS_SERVER_HOME environment variable as well? I don't see it in the file.
    Thanks

    Hi,
    This is pretty common scenario. The best way to achieve this is to split your servers using a collection and deploy a different client settings. You could target your collection using the OS or an OU in AD. There are many option there.
    You could also limit the access to the Server collection using Role Based Access to avoid any human "errors" on these collections. Users without rights to these collection just won't see them.
    https://technet.microsoft.com/en-us/library/gg682067.aspx?f=255&MSPPError=-2147217396
    http://blogs.technet.com/b/configmgrteam/archive/2011/09/23/introducing-role-based-administration-in-system-center-2012-configuration-manager.aspx
    Benoit Lecours | Blog: System Center Dudes

  • Labview 2012 Installer builder issues with Windows 7 64 bit

    I have a clients project application program I am working on and am having a lot of trouble getting installed applications to work on Windows 7 properly. The Labview Installer sets the default installation directory to "c:\Program Files\" on Windows Xp and on Windows 7 64bit this defaults to "C:\Program Files (x86). When I install the application on Windows 7 and run it, because Windows 7 64 bit unreasonably protects this directory and every folder under it, if you try to write file to any subdirectory under it (like a reports directory), windows 7 will not let the file write to the directory and the file(s) disappear and you get permission errors. This has been difficult to address. Even logging in as administrator, I have difficulty changing the folder permissions. In addition, when I am in the file write process, if the default directory is coded to come up in the file Open/Save dialog, will not properly
    go to and display these protected directories. So thinking that OK, I'll just chage the install directory to something direct to the C: drive and not the Program Files (x86) directory, so I have better control of the folder permissions. Now the Installer build gives errors. It built, but the install fails. Looks like National did not test this for Windows 7 very well. I have run into just about every issue possible with Windows 7 and Labview. Clearly Labview was not very well tested with Windows 7 6 bit. I do not have the Internet toolkit added to the application, only the VISA 5.2 driver. Anyone else having application issues with Labview and Windows 7 and have ideas how to work around this?? 
    Attachments:
    BuildErrors.txt ‏11 KB

    It's no NI's fault and has nothing to do with 64 Bit either. It is something MS changed starting with Vista, namely tightening security of the whole system to a similar level as was usual on more professional OSes like Unix 20 years earlier. A user has not rights anymore to write into the location where applications are installed. This is for one reason to protect installed applications from being modified by malicious code.
    Instead every application should write its runtime data in one of the user writable loacations such as the user's Documents directory for data files, or in the user's or the machine's configuration directory for configuration settings. For single installations you could always set the directory which your application got installed into to be user writable by changing the rights of that directory afterwards but for applications that get installed on normal user computers this is a VERY hacky and discouraged move. Same about installing your application into the root of your system drive. I think it was an oversight by MS to not protect that directory too from user modifications, but was most likely unavoidable to allow DOS application installations to still work.
    LabVIEW has functions to retrieve a whole bunch of those preconfigured and user writeable locations and you really should change your application to make use of those locations, instead of trying to write into the installation directory or installing the application into the root location of the system drive, if you want to be compatible with Windows Vista/7/8.
    Windows 7 also requires for a number of actions such as installing programs or drivers so called elevated rights. This means that even if you are logged in as administrator you have to explicitedly provide the admin password again to be able to perform the action. This can be done by starting the program as administrator, when this is available in the right click pop-up menu, and is also sometimes done automatically for applications that Windows determines to need those rights such as setup programs for installations.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • JDK 1.6_07 with Windows: System.out.flush() does not work...

    I wonder if this is a known issue: Since I upgrade the jdk1.6 version to the _07 pack, text IO does not work anymore with WinXP cmd.exe window. Assuming a static import of System.out, I use:
    static void prompt()
      out.print(pr); //pr is a prompt string...
      out.flush();
    }works as usual with Unix/Linux, but with windows nothing will be written to the terminal, until I make at least one input. In that case a barrage of cached prompts appear all at once.
    Do we have a bug for it, can we work around somehow?
    Thomas

    Since this code works correctly in Java 6u10 on Windows XP
    System.out.print("This is the data");
    System.out.flush();You are apparently doing something unusual or wrong. What is "out"?
    Show a small sample program that compiles and exhibits the problem when executed.

  • SnpsFTP not working with Windows domain/username

    Hi All
    We are using the following script to delete a file in FTP server. Works well with UNIX FTP server but fails with WINDOWS FTP server. Windows FTP username happens to be of format "domain/username". Is backslash causing the issue?
    Jython
    import snpsftp
    ftp = snpsftp.SnpsFTP('#PVV_SFTP_SERVER', ur"#PVV_SFTP_USER", 'PVV_PLAINPWD')
    ftp.delete ('#PVV_SFTP_FOLDER/#PVV_FILE_NAME');
    ftp.close()
    Error Message
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "/apps/oracle/product/ODI11116_frsh/oracledi.sdk/lib/Lib/snpsftp.py", line 50, in __init__
    self.connect(host, port)
    File "/apps/oracle/product/ODI11116_frsh/oracledi.sdk/lib/Lib/snpsftp.py", line 58, in connect
    self.ftp.connect(host, port)
    File "/apps/oracle/product/ODI11116_frsh/oracledi.sdk/lib/Lib/ftplib.py", line 129, in connect
    raise socket.error, msg
    socket.error: (146, 'Connection refused')
    Regards
    Prasad Jayakumar

    There is a misunderstanding from my side. Windows server uses SFTP. Is there any script or ODI tools available to delete a file in remote server via SFTP. Thank you.

  • MARS - NFS on Unix Services for Windows and deleting files

    Hello !
    I've prepared NFS server on W2k3 server with Unix Services for Windows installed. It works OK, the only problem is moveing/deleting files and folders. It seems like a problem with permissions for anonymous user. Does anybody have similar experience ?

    If you receive the following error message "Error ./pnarchiver Thread 2051:PN-0102:SQL error: ORA-01005: null password given; logon denied" then there is a Problem with archiving to NFS server. The directories for the archiving are properly created on the server but those directories remain empty. The workaround is that an inter operability issue exists between MARS and CygWin NFS server running on Windows 2003 server. To work around such inter operability issues, replace the NFS server with Microsoft Windows Services for Unix.

  • Have you moved from Unix/Oracle to Windows/SQL Server

    I am looking for people that have moved from Unix/Oracle to Windows/SQL Server...
    Would you do it again ?
    Did you save money ?
    Were you using Zones to virutalize on Unix ?
    Did you gain or loose overall Performance ?
    Have you had to perform a recovery on SQL Server ? 
    Have you done a recovery in Oracle ?
    Were you using Rman ?
    Which worked better ?
    We are going through an analysis of does it really make sense, save money and effect performance to move from a strong unix/oracle environment to a MS/SQL environment.
    THanks Rob
    [email protected]

    Hi,
    All our R/3 legacy systems are Windows/Oracle.
    All the new systems (BW, SRM, CRM, XI) are Windows/MSSQL.
    It was an order from the management to make the switch because of the high prices of Oracle licences.
    The official motto is now Oracle on Unix only and SQL server on Windows only.
    We get the same level of performance as with Oracle, but we, old SAP Oracle grumpy admins, are much more comfortable with Oracle admin than SQL server admin.
    imho, SQL server may seem simplier but it is much easier to look under the hood whith Oracle.
    We have to reinvent the wheel and it's kind of frustrating but we will cope with it...
    I would say that SQL server is not a good choice for BW usage because there is a lot more litterature on BW database optimisation for Oracle than MSSQL.
    The official SAP class does not speak at all about SQL server but has several chapters on Oracle...
    Regards,
    Olivier

  • Dual Boot with Windows ME

    i am very new to all this stuff. Can someone please guide me on how to go about installing Unix so that it also dual boots with windows ME.
    i am planning on doing some unix work..and installing oracle and learning oracle in the bargain at home. do u think this is the best way to go. any suggestions/guidance is appreciated.
    many many thanks

    I'd consider buying a second, inexpensive PC for Solaris. You can get a $20 mechanical switch that will let you share a single monitor. If two keyboards and mice are inconvenient, you can buy a KVM (keyboard-video-mouse) switch. If you just want to hack around, it's much more convenient to have two PCs. (IMHO)

  • Accessing Printer Port with Windows 7

    Hello all,
    I've been recently asked to port a Labview file from WinXP (x86) to Win7 (x64), and one of the problems I've come across is this infamous lockdown of I/O ports in Win7.  I've done lots of searching around but haven't found much that would seem to help me in my situation, so I thought I'd post and ask for your help.
    Basically, yes, the parallel port is being used as a poor man's DIO in my situation; we're using the individual bits as discrete signals that can be either high or low to communicate between two computers; one is Windows, one is Unix.  We used to use cviVXDwrapper.dll to do this, but that is no longer working.  All I need to do is flip individual bits at the right moment, it's not banging any data through or actually adhering to any communications protocol.
    I know that the easiest solution here would be to buy a cheap DIO card and call it good; at a matter of fact, I recommended that to my supervisor.  But he came back saying that "all the drawings would have to be changed" and there would be "a mound of cards to be bought" and we'd have to go through all these design revision change review boards...so, if there's any way to find a software solution instead of a hardware one, it would be easier and less time consuming.
    I can't give my entire .vi because of intellectual property/security concerns but I can provide a few screenshots that show just how simple the code is; we're literally just reading individual pins on the Parallel Port.  Is it really that difficult to do this now with Windows 7 and Labview?
    Attachment Notes:
    1.  to_printer_port.jpg - Here we have a simple snippet of code that, if the boolean value coming in is true, writes to bit 1 of the printer port. If that output is high, it lights up an indicator on the front panel called "FPGA Config".
    2.  from_printer_port.jpg - Another simple piece of code that reads a Printer Port pin and reports back in boolean whether it's high or low.
    Attachments:
    to_printer_port.JPG ‏14 KB
    from_printer_port.JPG ‏10 KB

    For anyone else searching around, I was able to find the solution!
    Check out this link to the NI Developer's Website:
    http://sine.ni.com/devzone/cda/epd/p/id/4213
    It has an example of using VISA resources to write to the Printer Port.  My guess is that to read you'd just swap out the write block for the read block (found under the Instrument IO/VISA area of the Function palette) .  Also note that pins 11 and 12 of the printer port *MUST* be grounded to keep timeout errors from occurring.  

  • Doe's the mac come with windows 7?

    Does the MAC come with windows 7?

    No. You can run Windows on a Mac in several different ways, but all require that you purchase Windows separately. Apple only supplies the Windows drivers needed to integrate with the Apple hardware.
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • Unix Files on Windows Server (read)

    Hi NG,
    we transfer form several locations files to our R/3 System (4.72) via secure copy (rcp with SSH). We do not know if the data comes from windows (cr lf) or unix (/0) or even hosts.
    Is there a way to read the file with abap and convert the files to windows.
    The files are ASCII or even EBCDIC (host).
    Are there function within R/3 to convert files from ascii (unix) to ascii (windows) and from ebcdic to ascii (windows).
    Regards
    Stefan

    950010 wrote:
    As I wrote in my question that due to compliance issue we have been asked to create the directory (that is currently on the same unix server on which our db is physically installed) in any other server (no matter unix or windows).And if that remote server is not available? Or if network connectivity to the remote server fails? Or if there is severe network congestion between the Oracle server and remote server? What then?
    How is the process on the local server suppose to deal with errors when it attempts to create a CSV file on the remote server? Or deal with network bottlenecks that results in severe performance degradation when trying to create a CSV file? Or if there lacks freespace for creating the CSV file?
    What about security? How is the local Oracle server to authenticate itself with the remote server? How is the remote server to protect that directory share against unauthorised access?
    How is this remote server going to provide access to authorised s/w to these CSV files?
    Who (local or remote processes) is going to manage this directory share and ensure old CSV files are deleted and that there is sufficient freespace for new CSV files?
    There are a LOT of questions that need to be asked... BEFORE deciding on HOW technically to do it. As the technical decision will be based on the functional requirements and how to best meet these.
    Technically - there is Samba, NFS, FTP, SFTP, SCP, RDIST and a number of other methods that can be used. But without asking the above questions and getting proper business answers, selecting a specific technical method is very much premature.
    You are asking the wrong questions, and in the wrong forum. You need to determine the business requirements first.

  • Syncing iphone with windows 7 contacts - error message outlook.pst not foun

    I have set set up ITunes to sync my Iphone GS with Windows Contacts. When I sync I get an error message :
    The file c:\Program Files\Common Files\System\Mapi\1033\Outlook.pst could not be found
    Sometimes the error message comes up 2 or 3 times.
    Secondly, my Iphone is syncing with something because an old version of my windows address book is now on my iphone. Of course if I add a new contact to Windows Contacts, it does not appear on my iphone.
    I dont have Outlook installed on my PC. It was removed, but I guess I do have an old outlook.pst file from my old times with Windows XP.
    So how does Itunes manage the sync and how can I stop it syncing with my old address book and use Windows Contacts? I have tried resetting my sync history but it did not work.
    I am running Windows7 (upgrade from Vista).

    I am also having issues with syncing my Iphone 3GS with the latest version on Itunes. I have for a long while now been doing just great. My contacts, phone numbers, emails have all synced very nicely, no problems. As soon as I downloaded the new Itunes 9.1 I can no longer sync contacts, and calendars, as usual.
    I tried several things that were suggested to me in the troubleshooting but nothing has helped. It usually tells me that my computer is not set up for syncing, and after arranging that it still doesn't work. As well, it says it cannot find the requested services.
    Please help.
    I am running windows 7, and have been for a while, it's not windows 7, it's the new Itunes upgrade.

  • IPod Classic - ok with Windows, not with iTunes

    Hi,
    I have a Classic 160GO iPod.
    Suddenly this problem appeared :
    - no music or pictures were recognized by my iPod, but the disk space was used for "Other"
    - this iPod is not known with iTunes
    - This iPod is known as a removable hard disk, via Windows 7 (Main computer), Windows XP (secondary computer), a linux thing (a friend computer).
    1. I already checked this iPod with the diagnostics mode (see https://discussions.apple.com/message/19048752#19048752)
    result is :
    - reallocs : 0
    - Pending sectors : 32
    My understanding is that my iPod hard disk is ok and valid.
    2. I followed most of the recommended way to repaird the iPod as per Support (8 out of 10)
    NOthing is working.
    I confirm I have installed the latest version of iTunes.
    3. I read the following page : https://discussions.apple.com/message/19158071#19158071 to find the relevant firmware.
    But the iPod Classic 160GO is not in the list.
    My questions
    --> Do you have an idea to solve my problem ?
    --> What could happend i I format my iPod with windows ? It would be only a hard disk after, wouldn't it ?
    --> I f I format, is there a solution to re-install the iPod software (= firmware ?)
    Thank you for your help.

    The iPod hardisk is  looks new from the Reallocs and ON Hours, but, it is rebooting more to get the correct spin for data verification, causing tImeouts,  so the Pending Sector will increase.
    There maybe something, near the iPod environment, that is causing the drive to fail, and overheat, if it has not already been damaged, or maybe it is just one Hardisk, that slipped through poor quality control.
    You can bring the Retract, Realloc and pending number low, by doing low level format, see this article, but your problem of Hardisk rebooting to find a good cluster, wont go away
    Just my thoughts.
    Magnets are the primary cause of hardisk crashes,  I would also suspect, using your handphone, while it is near the iPod would also be bad, see the YouTube video on hardboiled eggs using handphone.

Maybe you are looking for

  • Problem with serial number when in stalling second disc

    I am installing Adobe Photoshop Elements 10. The first disc installed fine. Then the computer restarted and I inserted the second disc. But this time when I put the same serial number in as I did before with the first disc, it tells me that it is inc

  • Oracle.xdo.parser.v2.XMLParseException: Bad character (1e)

    Hi, I am using BI Publisher shipped with Oracle EBS R12 (I think it is BIP 5.6.3). I have made a specific XSL-TEXT layout file to generate some output files in a proprietary format (for label printing). Everything is working like a charm so far. Howe

  • Problem in getting remote address?

    Hi, I have a procedure on my login page, which reads user's IP address and stores it in a log file. I am using the following statement to get the IP address of remote user: select owa_util.get_cgi_env('REMOTE_ADDR') from dual; It is running fine on m

  • HT201209 My itunes card says it's been redeemed but it hasn't

    It says my itunes card has been redeemed but it hasn't

  • Ipod fails to get a drive letter

    my ipod nano does not get a drive letter when connected. after assigning it a drive letter through disk management in windows xp, it behaves fine until itunes shows up and starts updating it. at this point, the ipod loses the drive letter. when i try