Write file using FileAdaptor

Hi,
I need to write the file like below format using fileadaptor.
*"smiith"*,Old Street,Old Town
*"Manchester"*,98-12-1988,hello
*"taisder"*,opppstreet ,juytr     
*"vansuha"*,dordan,utre
Anyone please tell me how we can provide double quotes to to this fields when we r writing file.

I have posted the answer in the other thread.
Re: How to write Header and Footer elements in Write file Adapter
Thanks,
N

Similar Messages

  • Write File using File adapter

    Hi,
    I need to write atleast two lines. first the column headers and in second line, the data. Tried using 2 PLs but I think first line is getting overwritten by second one.
    How can I achieve this?
    Pls. help me out.
    Regards,
    Nikhil

    I think i made u confused. Sorry about that. I have a new XSD that I am dealing with now. (Created using the file content pasted below)
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/ReadPOReceiptInbound856.2"
    xmlns:tns="http://TargetNamespace.com/ReadPOReceiptInbound856.2"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="ControlNumber">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ecedi701.bano" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ecedi020.neta" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.shpm" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.stat" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.cdat" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.pddt" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.fval" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.cdec" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.wght" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whwmd000.wght" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.stco" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.stco2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ecedi224.code" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.itbp" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.itbp2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ecedi224.code2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.risk" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.koch" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.cham" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.shpm2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="whinh430.curr" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <!--NXSDWIZ:C:\Projects\FAI\090605-1929\856.2:-->
    <!--USE-HEADER:false:-->
    the sample file content that is repeating is below:
    12020090605000000000000000000000071|C320|OUT340136|Sent|20090605192120|20090601111531|0|102|0|kg|20I|SN|ShpTo|||InvTo||0|0|OUT340136|
    12020090605000000000000000000000072|C320|OUT340151|Sent|20090605192155|20090601113334|0|102|0|kg|20I|SN|ShpTo|||InvTo||0|0|OUT340151|
    12020090605000000000000000000000073|C320|OUT340153|Sent|20090605192229|20090601113348|0|102|0|kg|20I|SN|ShpTo|||InvTo||0|0|OUT340153|
    12020090605000000000000000000000074|C320|OUT340154|Sent|20090605192256|20090601113357|0|102|0|kg|20I|SN|ShpTo|||InvTo||0|0|OUT340154|
    12020090605000000000000000000000075|C320|OUT340155|Sent|20090605192323|20090601113409|0|102|0|kg|20I|SN|ShpTo|||InvTo||0|0|OUT340155|
    How can I modify this xsd to achieve my desired goal?
    Rgds,
    Nikhil

  • How to read and write files using flex?

    Using flex, we would like to make some utility that will do a
    lot of reading and writing from local files.
    The writing is what I am more worried about. How is this
    possible?
    I want to make .zip files containing many xml files, and some
    assorted media files such as .swf jpeg, html, etc.
    I am new to flex btw, I've never used it properly before, and
    this is the main concern I have with flex, which is that it doesn't
    let me write and read lots of files.
    Mainly we are looking for a good cross platform solution that
    will let us develop an app, and flex looks professional and it is
    cross platform. The "internet app" side of things, isn't so much
    what we need really.
    Would wxWidgets be better suited to our needs?

    The Flash player sand box will not allow reading and writing
    local files. If you want to use Flex to create a desktop you will
    need the Apollo runtime. The alpha is available at Adobe
    Labs.

  • Creation of file using URI

    I am working on jsp
    I want to create a file object with path "http://localhost:8080/examples/"
    so i have tried to create file with URI as parameter but i'm not able to succed. so
    please do help me. thanks in advance.
    actual situation is any remote client must be able to create a file on the server. so please suggest a way for that

    Which problem exactly are you occurring? At which step are you failing?
    1) Get request parameter using HttpServletRequest#getParameter().
    2) Use request parameter for file path or filename somehow.
    3) Create file using new File(path, name).
    4) Put contents in file?
    5) Write file using Writer#write() or OutputStream#write().

  • Can't write files!!!

    I need some code or a clear tutorial that explains how to write files using an applet. i want to create a game that you can save on so i want to save it to the server. can anyone help?
    thnx

    that site doesn't fully explain how to write files to
    a database from an applet. can u give something else.Well, it does answer some questions as to why you can't write files from an applet and I thought it would give you a better understanding of it and you could narrow your search into finding an answer. I guess I was wrong.
    Good luck though.

  • How can i format my external hard drive to write files from Mac without loosing the files that i alredy have on my external hard when i used it with windows?

    How can i format my external hard drive to write files from Mac without loosing the files that i alredy have on my external hard when i used it with windows?
    I have been using Windows to write files to my 1TB WD external hard drive and I do not want to format to loose the files capacity of around 500GB
    Someone, Please help

    Hi Allen,
    Is there any way to store the back up to Mac and restore after formating?

  • Why does Firefox 7 freeze when I paste a filename when printing to a file using Microsoft XPS Document Writer?

    This is more of a bug, and it doesn't seem to happen all the time.
    I like printing web pages to Microsoft XPS Document Writer (.xps) format. FF7 seems to freeze often when I paste a filename (usually from copying something, like the title, from the web page itself) after trying to print to a file using Microsoft XPS Document Writer. I think it may be that I wind up copying some special formatting (or maybe a line break) and that causes FF to freeze (I then have to force-close it using Task Manager). Just a bug that I hope the developers will note and fix.
    Another question, not quite related to the above, but is there a way to save an html web page to save only the text stuff? When I save to Text File in Firefox, I usually wind up with all the html crap in it too, when I just wanted the text content portion. TIA.

    Can you undo the system restore?
    Note that using System Restore can cause your Firefox installation to get corrupted because not all files are restored (only files in a white-list), so be cautious with using System Restore.
    *You may lose data in the Firefox profile folder like .js and .ini files pr profiles.ini can be affected.
    *You may need to (re)install software that was affected.
    In case you need to reinstall Firefox then you need to delete the Firefox program folder before reinstalling to make sure that all files get replaced.
    A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls

  • How to write as XML file using java 1.5

    hi all,
    i am trying to create an XML file using java 1.5. I took a XML creating java file which was working with java 1.4 and ported same file into java 1.5 with changes according to the SAX and DOM implmentation in java 1.5 and tried to compile. But while writing as a file it throws error "cannot find the symbol."
    can any body help me out to solve this issue.......
    thankx in advance
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.NamedNodeMap;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.DocumentHandler;
    import org.xml.sax.InputSource;
    import org.xml.sax.helpers.ParserFactory;
    import java.io.*;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();                   
                   dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();                   
    Document xmlDoc =  db.newDocument();
    // this creates the xml document ref
    // parent node reference
    Element rootnd = (Element) xmlDoc.createElement("ALL_TABLES");
    // root node
    xmlDoc.appendChild(rootnd);
    Element rownd = (Element) xmlDoc.createElement("ROW");
    rootnd.appendChild(rownd);
    Element statusnd = (Element) xmlDoc.createElement("FILE_STATUS");
    rownd.appendChild(statusnd);
    statusnd.appendChild(xmlDoc.createTextNode("Y")
    FileOutputStream outpt = new FileOutputStream(outdir + "//forbranch.xml");
    Writer outf = new OutputStreamWriter(outpt, "UTF-8");
    //error is occuring here Since write method is not available in the Document class
    xmlDoc.write(outf);
    outf.flush();

    Hi,
    when I look in the JDK1.4.2 specification I don't see any write method in the Document interface.
    However, your solution is the Transformer class. There you transform your DOM tree into any output you need. Your code sould look something like this:     TransformerFactory tf = TransformerFactory.newInstance();
         // set all necessary features for your transformer -> see OutputKeys
         Transformer t = tf.newTransformer();
         t.transform(new DOMSource(xmlDoc), new StreamResult(file));Then you have your XML file stored in the file system.
    Hope it helps.

  • How to write a CLOB to file using UTF-8

    I'm new to java and I have the following problem.
    I need to write a CLOB to file using the UTF-8 characterset (I'm generating an xml file). My database characterset is WE8ISO8859P15.
    I've tried the code below but the resulting output fails validation in an xml editor due to an 'invalid character' error :
    create or replace
    and compile
    java source named "ClobUtil"
    as
    import java.io.*;
    import java.lang.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.*;
    public class ClobUtil {
    public static void save(CLOB clob, String filename) throws Exception
    Connection conn = DriverManager.getConnection("jdbc:oracle:kprb:");
    conn.setAutoCommit(false);
    InputStream is = clob.getCharacterStream();
    FileOutputStream os = new FileOutputStream(filename);
    int size = clob.getChunkSize();
    byte buffer[] = new byte[size];
    int length;
    while ((length = is.read(buffer, 0, size)) != -1) {
    os.write(buffer, 0, length);
    is.close();
    os.close();
    conn.close();
    I see that the getCharacterStream() method returns a Unicode character stream but how do I output this to file ??
    Thanks in advance

    File file = new File( "myfile.utf8" );
    FileOutputStream fos = new FileOutputStream( file );
    OutputStreamWriter osw = new
    OutputStreamWriter( fos, "UTF8" );
    Writer w = new BufferedWriter( osw );
    PrintWriter out = new PrintWriter( w );
    Or whatever you need. Note that this merely allows you to specify the encoding to be used in the output file, it does convert the encoding for you. I think in your case this will work since you already know the output stream will not contain the full range of UTF8 characters anyway.

  • How to write a file using mod pl/sql

    hi,
    i am having a submit button in my procedure. which should inturn create .sql file in a file path.
    is there any way to create a fileusing htp and htf methods.
    Thanks in advance
    Hari

    >
    i am having a submit button in my procedure. which should in turn create .sql file in a file path.
    is there any way to create a file using htp and htf methods.
    >
    Why are you wasting your time coding from scratch using the PL/SQL Web Toolkit instead of the APEX framework?
    From Re: how to write a file using mod pl/sql it appears that you are not using APEX, so a number of the approaches APEX offers are not relevant. You appear to be looking for a file download solution using the <tt>wpg_docload.download_file</tt> method, such as:
    create or replace procedure download_file (
        p_filename  in     varchar2
      , p_mimetype  in     varchar2
      , p_content   in out nocopy blob)
    is
    begin
      -- Set up HTTP header.
      -- Use "application/octet" as default MIME type.
      owa_util.mime_header(nvl(p_mimetype, 'application/octet'), false);
      -- Set the size so the browser knows how much to download.
      htp.p('Content-length: ' || dbms_lob.getlength(p_content));
      -- Filename will be used as default by the browser in "Save as..."
      htp.p('Content-Disposition: attachment; filename="' || p_filename || '"');
      -- Close header.
      owa_util.http_header_close();
      -- Stream the file content to the browser.
      wpg_docload.download_file(p_content);
    end download_file;

  • I can not save an email to file using XPS Writer. I'm using Windows 7 . Works fine with Internet Explorer?

    When I try to perform this function of saving an email to file using Windows 7 XPS Writer. I receive a message stating that Firefox is not responding. XPS Writer is working using Internet Explorer?

    I've seen this error with Chrome. Are you using IE and is it updated?
    I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.

  • How to write data to text file using external tables

    can anybody tell how to write data to text file using external tables concept?

    Hi,
    Using external table u can load the data in your local table in database,
    then using your local db table and UTL_FILE pacakge u can wrrite data to text file
    external table
    ~~~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251
    UTL_FILE
    ~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#sthref14093
    Message was edited by:
    Nicloei W
    Message was edited by:
    Nicloei W

  • How to Write data in Excel File using java

    Hi
    can anybody help me to write data in excel file
    using java code
    Thankx In Advance

    How much are you willing to pay for that?
    If you want it for free, http://jexcelapi.sourceforge.net/

  • Write to existing file using servlets

    Every time I try to read an existing file using my current set of servlets, I get "File cannot be found". I don't understand what the problem is because I'm using the exact same location as the code where I read the document. Is there something else I'm missing? I've tried countless methods of writing, each will compile and such, but all give me the same result (IE nothing). Here's how my horrific code looks right now. Much was taken from the previous code that checks the passwords file.
    Technically, it compiles and runs, but I get "java.io.FileNotFoundException: \WEB-INF\passwords (The system cannot find the path specified)" in the output. The file IS THERE and can be read in my password checking servlet without a problem...
    package hw3Pack;
    import java.io.*;
    import java.util.*;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.*;
    public class passCheck extends HttpServlet {
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
            response.setContentType("text/html");
            HttpSession session = request.getSession(true);
            PrintWriter out = response.getWriter();
            try {
                    String filename = "/WEB-INF/passwords";
                    String email = request.getParameter("email");
                    String password = request.getParameter("password");
                    String remember = request.getParameter("remember");
                    ServletContext context = getServletContext();
              FileOutputStream fos = new FileOutputStream(filename);
                    InputStream is = context.getResourceAsStream(filename);
              if (!is.equals(null)) {
                   InputStreamReader isr = new InputStreamReader(is);
                   BufferedReader reader = new BufferedReader(isr);
                   String text = "";
                            } // if (is != null)
                    else {
                    } // else (password not blank)
            finally {
                out.close();
            } // finally
    }

    OK... I feel a bit dumb now... This code was working earlier (the writing part) and now it's not working since I added in the username check portion. It should be essentially complete at this point, I just need to figure out why it no longer writes the file. Any clues or insights?
    I'm about to add a password checker (confirm both passwords entered on registration form are equal) Lets hope I don't mess more up...
    package hw3Pack;
    import java.io.*;
    import java.util.*;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.*;
    import java.net.*;
    public class regComplete extends HttpServlet {
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
            response.setContentType("text/html");
            HttpSession session = request.getSession(true);
            PrintWriter out = response.getWriter();
            boolean clear = true;
            try {
                    String email = request.getParameter("email");
                    String password = request.getParameter("password");
                    out.println(email +" and " + password);
                    String filename = "/WEB-INF/passwords";
                    ServletContext context = getServletContext();
                    InputStream is = context.getResourceAsStream(filename);
              if (!is.equals(null)) {
                   InputStreamReader isr = new InputStreamReader(is);
                   BufferedReader reader = new BufferedReader(isr);
                   String text = "";
                            while ((text = reader.readLine()) != null) {              
                                    StringTokenizer st = new StringTokenizer(text, "," );
                                    String getEmail = st.nextToken();
                                    String getPass = st.nextToken();
                                            if (email.equals(getEmail) && !email.equals(null)) {
                                                    clear = false;
                                                    out.println("I'm sorry but that email address is in use.  Please try again.");
                                            } else {
                                            //do nothing
                    if (clear==true) {
                        File file = new File("/WEB-INF/passwords");
                        BufferedWriter writer = new BufferedWriter(new FileWriter(file, true));
                        out.println("going");
                        writer.append("\r\n" +email +"," +password);
                        out.println("Writing");
                        writer.close();
                        } else {
                } // try
            finally {
                out.close();
                } // finally
      }

  • Write to a file using several threads

    Hello,
    I'm trying to implement a writing procedure into a file using several different threads. The idea I have is to make each thread to write in a different place in the file. In your opinion is there a possibility of some incoherence.
    Regards,
    Anton
    Edited by: anton_tonev on Oct 22, 2007 3:28 AM

    At this moment I can't give a source code example because I'm writing it :) and I'm trying to see the cases where I may have some problems.
    But my idea is to access the file at any time and to write into it with differenent threads in a differenet places in this file. In fact the problem I'm trying to solve is :
    I have a objects called Data that are generated by some other thread independent of my application. This thread puts the Data objects in some kind if buffer. When the buffer is full, I'm creating a few threads fo every object Data in this buffer (the data objects in its own is some collection of floats and doubles) So I'm trying to position the new created threads over the file but in different places and then make them write the data collected in the object Data.
    To position de threads over the file, I'm accessing it by some synchronous method to undestand where it can write in this file and the writing is not synchronous because I'm trying to calculate the exact place and number of bytes of writing and in this way to avoid (may be) the eventuality of errors.
    Regards,
    Anton

Maybe you are looking for

  • Error in Cost Center Hierarchy

    Dear all, When I delete all cost center in standard hierarchy by tcode OKC4, some cost centers still appear in cost center hierarchy with activation status is "red". How to delete all cost center with "red" activation status in this case ? When I che

  • Ipod nano Not detected in my computer or itunes

    Okay, first off, I have tried several different things to correct this issue, and NOTHING has become remotely helpful. My computer doesn't even make the little "ding" sound that I get with all my other usb devices upon plug in. The ipod will be charg

  • GL account mapping issue when run RPDKON00

    Hi experts, I got this problem with a new mapping that i made for a GL account. the WT X was linked to a symbolic account 2170 (begda 1800 - endda 9999) with a GL account C0000, but the new mapping needed that that same WT X be linked to a new GL acc

  • Change default language in SU01 (CUA)

    When starting transaction SU01 in the CUA (ECC 5.0)  the language field is already filled in with EN. I want this field to be empty when starting thsi transaction OR I want to be able to change the default language to NL. Could anyone explain me how

  • How to download oracle patch set 10.2.0.5  for Windows server 2008 R2

    I need  download and install oracle patch set 10.2.0.5 and install  for Windows server 2008 R2 (notes 1486772). But I  get message "Download basket request for update has been processed. Unable to add 1 new object(s). The objects are already part of