Fixed length fileadapter [multiple records are of multiple types]

Hi,
I am using Jdev 10133 and SOA suite 10133.
I am using fixed length(multiple records are of different type) file adapter to read data from a DAT file.
I need to read the data based on condition.
i.e: the DAT file looks like below
city1           EMPName1                      female                organisation1
city2           EMPName2                      male                   organisation2
city2           EMPName3                      male                   organisation1
city1           EMPName4                      female                organisation1Here i need to read the records based on gender.
I was able to read based on city i.e first column.
In adapter wizard it is giving only endposition.
How to read data based on gender??
Plz help me regarding this.
Regards.
Edited by: [email protected] on May 21, 2009 1:44 AM

not sure if this is an exact example but when you create youe xsd you can use white space as a delimiter, so if your fields don't have spaces you can use this.
Also you can mix and match fixed length with delimiters
cheers
James

Similar Messages

  • Creating Fixed Length from Database Records

    Hello Folks,
    I need to take records from a table and write a fixed length
    text file. What is the general procedure for doing this? Any
    special packages I need?
    TIA.
    Alex Wolff.

    The mechanisms for creating the text file are either to spool a query result from SQL*Plus or to use the UTL_FILE package to write from a PL/SQL procedure.
    To write fixed length records you would do well to convert every column to text. A sample select clause might be ...
    select to_char(my_number,'99999990.000')||
    to_char(my_date,'DD-MM-YYYY')||
    rpad(my_text,30) as fixed_output
    from ...
    I hope this covers your question.

  • File Adapter - Multiple fixed length records in the same file

    Hi
    I am developing a BPEL process that "Sync Read" a file. The file is a flat file comprising of multiple records and each record is of fixed length. There are no delimiters in the file. I got the xsd associated to this flat file and each element is defined with some fixed length and starting position. The xsd is valid.
    When I execute the BPEL Process, I get the following error - I verified the file structure and the position of the fields map correctly. Remember this is not an xml file just a plain text file. Can BPEL process such files or should I always provide an "xml" file?
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="detail"><detail>Start of root element expected.</detail></part><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'SynchRead' failed due to: Error while translating. Translation exception. Error occured while translating content from file /tmp/inputDir/VDA1.txt ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="code"><code>null</code></part></bindingFault></bpelFault>
    Thanks
    Shanthi

    hi,
    see you actually read a XML file and when you read it it is verified by a XSD the location of the XSD is in the XML file it self,
    <tns:abc xmlns:tns="http://xmlns.int.aaa.co.uk/xmlns/BPELXXX"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.int.aaa.co.uk/xmlns/BPELXXX *c:/aaa/bbb/ccc/XSD/abc.xsd*">
    if the file you are reading is valid then it is read, other wise not, I am not sure about sys read, but in empty BPEL process, if the XML is not validated with the XSD, then the XML is not read, I am still not sure what is the meaning of flat file, are you doing a opaque read?
    Yatan

  • How to define a schema for fixed length consisting of multiple records of different types having header detail and footer at positions 22 and 23 namely having 10 for header 20 for detail and 30 for footer

    how to define a schema for fixed length consisting of multiple records of different types having header detail and footer at positions 22 and 23 namely having 10 for header ,20 for detail and 30 for footer.
    here is the sample file
    DDWTYBILL13092502572 1000000112\\NHLSFS\ORACLE\ORACLE\BILLING\VERIFY\            2013/09/25 01:19:08 BILLEND     
    DDWTYBILL13092502572 2000000212PRIVATE             PRIVATE             STY5572142     010700         INV                              12STYD000789                  02-AUG-20130000010472      STY       STY       1100611006MGIT                91  NNM    DIMPHANA,CN,CELESTE NERINA                                                                                                        09-JAN-1964                              TYG       A2        DR DU PREEZ                                                                                         5602181             63301345       TB731543                                           Suspect TB ?CA, (L) EMPIEEM                                           Ward A2                                           TYGERBERG HOSPITAL                                                                                  Z03.0                                                       Z03.9                                                          05-AUG-201305-AUG-201324-SEP-2013FEND    113.60
    DDWTYBILL13092502572 2000000312PRIVATE             PRIVATE             STY5572149     010700         INV                              12STYD000789                  02-AUG-20130000010472      STY       STY       1100611006MGIT                91  NNM    DIMPHANA,CN,CELESTE NERINA                                                                                                        09-JAN-1964                              TYG       A2        DR DU PREEZ                                                                                         5602181             63301345       TB731548                                           Empyema BPF                                                           Ward A2                                           TYGERBERG HOSPITAL                                                                                  Z03.9                                                       Z03.9                                                          05-AUG-201305-AUG-201324-SEP-2013FEND    113.60
    DDWTYBILL13092502572 2000000412PRIVATE             PRIVATE             STY5572351     010700         INV                              12STYD000789                  02-AUG-20130000010472      STY       STY       1100611006MGIT                91  NNM    DIMPHANA,CN,CELESTE NERINA                                                                                                        09-JAN-1964                              TYG       A2        DR DU PREEZ                                                                                         5602181             63301345       TB731584                                           Suspect TB ?EMPIEEM, ?CA                                              Ward A2                                           TYGERBERG HOSPITAL                                                                                  Z03.0                                                       Z03.9                                                          05-AUG-201305-AUG-201324-SEP-2013FEND    113.60
    DDWTYBILL13092502572 2000000512PRIVATE             PRIVATE             STY5572352     010700         INV                              12STYD000789                  02-AUG-20130000010472      STY       STY       1100611006MGIT                91  NNM    DIMPHANA,CN,CELESTE NERINA                                                                                                        09-JAN-1964                              TYG       A2        DR DU PREEZ                                                                                         5602181             63301345       TB731585                                           Suspect TB ?EMPIEEM, ?CA                                              Ward A2                                           TYGERBERG HOSPITAL                                                                                  Z03.0                                                       Z03.9                                                          05-AUG-201305-AUG-201324-SEP-2013FEND    113.60
    DDWTYBILL13092502572 2000000612MAJOR               MAJOR               STY5577530     010700         INV                              12ZTYG000009                  02-AUG-20130000010472      STY       STY       1100611006MGIT                91  NNS    ZOZI,S,SIYAMBONGA                                                                                                                 27-MAR-2010                              TYG       D3        DR MAHOMED                                                                                          5602181             113799662      TB731663                                           Lymphadenitis                                                         Ward D3                                           TYGERBERG HOSPITAL                                                                                  I88.9                                                       Z03.9                                                       H1 07-AUG-201307-AUG-201324-SEP-2013MEND     58.52
    DDWTYBILL13092502572 2000000712MAJOR               MAJOR               STY5577537     010700         INV                              12ZTYG000009                  06-AUG-20130000010472      STY       STY       1100611006MGIT                91  NNS    DLAMINI,N,NTLANTLA                                                                                                                09-OCT-1976                              TYG       F1        DR WZESE                                                                                            5602181             135524676      TB731666                                           Suspect TB                                                            Ward F1                                           TYGERBERG HOSPITAL                                                                                  Z03.0                                                       Z03.9                                                       H1 07-AUG-201314-AUG-201324-SEP-2013MEND     58.52
    DDWTYBILL13092502572 30003034120000003032END

    You can create an nXSD using Native Format Builder and use lookAhead attribute to read values at specific position and use that as the choice. You can find an example here
    http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994/nfb.htm#BGBBAJFD

  • Multiple idoc segment values to field fixed length FCC

    Friends,
    I need help to resolve a mapping issue. here is the brief about the scenario.
    Scenario: IDoc to Flat file Fixed length fields
    Issue: Idocs has values in multiple segments. i need to check condition for each segment occurrence if value exists then pass value if not then pass constant (i have to pass constant so that i can get the actual column width after FCC)
    Iam using the following logic.
    If condition then value1 -> remove contexts -> split by value -> target
    My scenario works fine for the above mapping however when i try introduction a constant in "if then else" then all my contexts in the target structure messes up.
    Thanks for your help.
    Regards,
    Pavan

    Did you tried MapWithDefault before Remove Contexts? To give more perfect solution , we would like to see a sample structure.
    raj.

  • How can I change the length of multiple lines at the same time?

    This just seems like it should be a no-brainer, but obviously for me it isn't.  I'm trying to change the length of multiple lines, that are at different angles, at the same time, in CS4.  Basically, I design the face of dials used for airplane instrument gauges (like RPM, Torque, etc), and they have gradiation marks (lines) located all around, similar what a clock looks like with the hour and minute gradiation marks (lines).  Is there a way to select all the lines, that I know are the same length, and change it to a different length, that's accurate to the 1/100th of an inch?  It would just be like selecting multiple lines that have all the same stroke, then using the stroke box to change the stroke weight from .025in to .030in.
    I've used the transform box to change the 'height' of a line before, but the line has to be at 90 degrees (straight up and down), and that won't work for the lines that are at, say, a 45 degree angle.
    I hope i'm explaining this in a way that someone will understand. If not, I can sure try to clarify more, or insert the picture so you could see what i'm talking about.
    Thanks for any help you can give!

    OK, after fiddling around with everyone's ideas, I think I finally got it. I knew there had to be something with proportions between W and H, but couldn't figure out the math, until Jacob answered with:
    "If each line must be strecthed from the inner/outer end, you may select each and use the Transform palette, choosing the right Reference Point, multiplying by the proportion in W or H (1.75/1.5), and Ctrl/Cmd clicking."
    Now, I basically did everything above, (but I couldn't figure out what you were talking about with the Ctrl Clicking thing), except after figuring out the right proportion (which ends up being so small you guys would die if I told you the number; the numbers I gave earlier were just an example and much larger than what i'm really working with) I just clicked the little chain next to the W and H boxes to constrain the proportions. I then put the new number (multiplied proportion by whatever was in W) in the W box. The line lengthened perfectly toward the center of the dial, keeping the correct angle!
    And Harron-Thanks for the link to Teri's, It is going to help with some things I do, but most of the dials I design don't have equal distances between each gradiation mark, and the blueprints I work off of usually have exactly what distances that the grad. marks are supposed to be. So, after selecting one of my grad marks that is already at it's correct place, I then use the rotate tool and Alt-Clicking the very center of the dial, I can then put in exactly what distance I want the next grad. mark to be at, I hit copy (instead of OK) and there will be a new grad. mark exactly the correct distance from my original. Then if I want to have the 3rd grad. mark I just hit Ctrl-D and it will copy another mark to the next position. I don't know if you necessarily wanted to know all that, but i thought i'd explain why I like doing it that way.
    A BIG thanks to everyone! I'm really a AI newbie and am the only one at my company that knows how to use it, so I don't have anyone close to ask stupid questions to. So I appreciate all your help!

  • External table, fixed columns and variable record length..

    Hi all,
    I'm trying to create an exernal table of a txt-file. Te records are delimited by newlines and the field lengths are fixed. But...
    When one or more of the last columns are missing the record is truncated.
    Here's the problem: the access parameter "missing field values are null" doesn't seem to work here.. And all incomplete lines are rejected!
    Any ideas??

    Well, seems like I was on a wild goose chase here.
    The original version of the file was not in UTF8 but in ANSI. But for some reason somebody thought it was necessary to convert the file to UTF8.
    So, although my question isn't answered yet, my problem has been solved.

  • How do I change the length of multiple photo's after I've added them?

    How do I change the length of multiple photo's after I've added them?

    Hey,
    The best way to do this is to select all the clips by holding down the shift key or command key if the clips you want to change are not all right next to each other and then selecting each clip that you want to change. Then double-click on the clips which will open up the inspector tab and then you can change the duration. If you want to just change all clips to the same duration just double-click on one of the photos and in the inspector tab next to the durationt tab you will see a box that says "add duration to all clips". If you click that, when you change the duration all the photos will change to that duration. That will then change the duration of all the clips at the same time.

  • Exporting fixed length records in a .txt format

    Post Author: jnesbitt
    CA Forum: Crystal Reports
    How can I configure Crystal Report detail records so they can be exported in a fixed legth .txt record format?
    Using Crystal Reports 9.2.3.884

    Post Author: SKodidine
    CA Forum: Crystal Reports
    I have created CR detail records fixed length of 400 and then exported them to text.
    This is how I did it, there might be other ways and I even though I created them in CR XI, it should be similar in CR 9.
    Let us assume that your fixed length record needs to be 100 bytes long.  Create a formula with all the fields concatenated, that you would otherwise display in the details section.  Create a second formula that will use the space function to put trailing spaces.
    Here is an example for a fixed length record of 400:
    Here are my two fields in my record that have been concatenated.
    Formula 1: RecordType & totext(BatchNumber,"0000000");
    Formula 2: {@Formula1} & space(400 - length({@Formula1}));

  • Problem with added carrige returns in download of fixed length records.

    Hi,
    I'm hoping that someone can help me, I'm at a complete loss.
    I am downloading fixed length text records from our extranet via JSP. The problem is that 8 addtional carrige returns are being added to the records somewhere during this process, rendering the files useless. The following is the code I'm using
    <%
    FileInputStream fInputStream = null;
    String piccareD = "/usr/local/apache/tomcat/webapps/piccare/";
    String filePath = piccareD + "x/" + request.getRemoteUser() + "/dnload/";
    String fileName = request.getParameter("fileName");
    int ch;
    String dnloadFile = filePath + fileName;
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment;filename=" + dnloadFile);
    Connection con = ConnectionServlet.getConnection();
    try
      fInputStream = new FileInputStream(dnloadFile);
      while ( (ch = fInputStream.read() ) != -1)
          out.write(ch);
      log.logEvent(con, LogElement.DNLOAD, fileName);
      log.setRetrieved(con, fileName, tStamp.getStamp());
      if( ! (fileName.indexOf("archive/") > -1) )
           String proc = "mv " + dnloadFile + " " + filePath + "archive/" + fileName;
           Process mv  = Runtime.getRuntime().exec( proc );
           Thread.sleep(100);
           int ec = mv.exitValue();
           mv.destroy();
           System.err.println( ec );
           if( ec != 0 )
    } catch (Exception e) {
            System.err.println(e.getMessage());
            log.logEvent(con, LogElement.DNLOAD_ERR, fileName);
    %>Any help is sincerely appreciated.
    Thank you!
    [email protected]

    You might try setting the buffer size to 0 for the jsp page and see if that helps.

  • ? Flash CS4, Is it possible to adjust the length of multiple timelines at once?

    Hi,
    I am using Flash CS4. Is there any way to adjust the length of multiple timelines at once? I am doing an animation of leaves falling from a tree. The leaves alone have 17 separate timelines on separate layers plus each has it's own guide layer.
    If I had the ability to to select all of the timelines together and adjust all of their respective start and end times at the same same time, relative to each other as well as separately, life would be so much easier!
    Of course I can do it timeline by timeline, no problem, but I can't seem to adjust the length of more than one timeline at a time. (no pun intended)
    Even when I select more than one timeline, the double arrow only adjusts the length of one timeline. Even each guide layer's length has to be adjusted separately. I understand the benefit of this, but, testing timing and making adjustments would be so much simpler and go so much faster if I could select and drag multiple timeline lengths at the same time.
    Is there any way to do this?
    I'm new to Flash so, thanks in advance for your patience with me!
    SabelV

    Thanks! I had a feeling. It's nice to have the answer. Oh well, now I can get back to work and not waste any more time with that part of the puzzle. You've been very helpful and I'm sure your answer is correct.  Wish I knew how to rate your answer even higher. Thanks again!

  • Reading fixed length file with different record types

    Hi,
    I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
    But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
    How we need to read such files.
    Thanks
    Ravdeep

    hi ,
    u cannot use the default wzard for this
    use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • Fixed Length records using SQL

    hi , using the following code in a file that generates an output file with a fixed length 300 character lines.
    SPOOL C:\PHONE_SAMPLE.OUT;
    SET HEADING OFF;
    SET PAGES 0;
    SET ECHO OFF;
    SELECT rpad(CONTACT_ID,15),rpad(PHONE1,15),rpad(PHONE2,15),rpad(PHONE3,15),rpad(PHONE4,15),rpad(PHONE5,15),rpad(PHONE6,15)
    ,rpad(CALLSEQ,6),rpad(NDCALLSEQ,6),rpad(LANG,3),rpad(FIRST,25),rpad(LAST,25),rpad(CONCODE,10),rpad(EMAIL,30),rpad(TXTMSG,20),rpad(WVEND,20),
    rpad(APPTSTART,14),rpad(APPTEND,14),rpad(APPTTYPE,10),rpad(APPTLOCTION,10),rpad(FILLER,1)||'\n'
    FROM PHONE_SAMPLE;
    SPOOL OFF;
    After I run this I get my data and the following below - my end of Character line, and then "22 rows selected" - How do I remove the 22 rows selected. and stop at \n. Any help appreciated.
    Is it a set command I am missing ?
    \n
    22 rows selected.

    Hi,
    SET FEEDBACK OFF
    And you don't need SET HEADING OFF when you have SET PAGES 0
    And you don't need to end SET commands with ';' since they are SQL*Plus commands
    Regards
    Peter

  • Adapter file receiver - file with fix length record

    Hi everybody,
    In the file adapter receiver, I want to create a fixed length record file .
    Each record need to have the same size.
    How is it possible, because I have a file which contains variable legnth depending of the lenght of message?
    exemple:
    <mess>
       <row>1234567</row>
       <row>123456789A</row>
    </mess>
    give the file
    1234567<CR>
    123456789A<CR>
    <CR> means carriage return
    and I want a file like
    1234567   <CR>
    123456789A<CR>
    with the same lenth of record (10 in the example).
    Can anyone help me, ,please?
    Kind regards.
    E. Koralewski

    Hi Eric,
    Create a value user defined function with one input argument a and name it is inputpad. Then add the following code:
    Imports:  java.*;
    while (a.length()<Integer.parseInt("10"))
         a= a +" " ;
    return String;
    Here I am assuming your fixed length for the field is 10. If it is more or less then change the number. Now in your mapping do all your logic and then in the final add this like:
    input ---> your logic --> inputpad udf --> target.
    Regards,
    ---Satish

  • [svn:fx-trunk] 11286: Small fix to List multiple selection commit.

    Revision: 11286
    Author:   [email protected]
    Date:     2009-10-29 16:59:07 -0700 (Thu, 29 Oct 2009)
    Log Message:
    Small fix to List multiple selection commit.
    Problem: Dispatching programatically mouse_down event to the item renderer would not put it in the selection.
    Reason: commitSelection() was getting called twice, once through ListBase.commitProperties() and a second time through List:commitProperties()
    Fix: Clear the multipleSelectionChanged flag inside commitSelection() to prevent it from being called twice.
    QE notes: None.
    Doc notes: None
    Bugs: None
    Reviewer: Glenn
    Tests run: checkintests, mustella (List)
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as

    You have used elements like header, footer, footer1 and nav without using the correct DOCTYPE declaration. Replace the first line of your code with
    <!doctype html>
    Also have a look here for other problems http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhome.surewest.net%2Fstorytales%2F test%2Fforposting.html
    After the above has been fixed, please come back here to fix the remaining problem(s)
    Gramps

Maybe you are looking for