OracleSOA - File Adapter - Correct mechanism to get the line number from the file

We are using Oracle SOA process to read data from a file, process the data and write it to the database. SOA process is created using Oracle File Adapter to read the data, Oracle BPEL to transform & process the data and Oracle DB Adapter to write the data into the database.
Oracle File Adapter uses native schema to process the fixed length data in the file. The number of rows in the file may exceed more than 500,000, to support processing of large files we use chunk size in the file adapter as 4000 rows. In each read operation, file adapter reads the data that matches to the schema, there might be few rejected rows as well.
Oracle File Adapter property - jca.file.LineNumber gives me only the line number till what line the data is read. Is there any way to get the line number in the xml message, which exactly matches to the line number in the file.?
Flat File Format: (Every file has one header, trailer and multiple data lines),
HEADER02 -
L01
L01
L01
TRAILER02
Line number is one of the crucial requirement in the development of the SOA service, this is used to back trace the information from which source and line the data has come.

Hi Anshul,
Thanks for sharing your thoughts.
I am using DB adapter to insert the data into db.
While doing the xsl transformation I can get the index of the message using position(), but that is not the correct way as there can be rejected lines by the file adapter.
Even if I maintain a local counter variable, it will not consider rejected lines and increment that, which is not correct.
Thanks,
Ravindra

Similar Messages

  • How to get the line number of source file?

    Hi,
    What is the equivalent in Java of the __LINE__ and __FILE__ macros in C? I want to print out the line number and the file name where the instruction is being executed.
    Thanks,

    If you are doing this because you're implementing your own debug logging, have a look at Log4J.
    You can configure it to log classnames, method names and line numbers of the code you're executing.

  • Getting valid idoc number from the sales document

    hi,
    Iam sending the code for getting the idoc number from sales document.
    but iam not getting the result.
    please see the code and correct the code so that i will get the idoc number from the sales document.
    tables edid4.
    data l_docnum like edid4-docnum.
    parameters:p_vbeln like vbak-vbeln.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
      exporting
        input         = p_vbeln
    IMPORTING
       OUTPUT        = p_vbeln
    select single docnum from edid4 into l_docnum where sdata like '&p_vbeln&'.
    if sy-subrc = 0.
    write edid4-docnum.
    else.
    write ' the record is not found'.
    endif.
    it is very urgent..............
    thanks in advance......

    See the below code :
    report zxyz.
    tables edid4.
    data l_docnum like edid4-docnum.
    parameters:p_vbeln like vbak-vbeln.
    <b>data sdata like edid4-sdata.</b>
    start-of-selection.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
    input = p_vbeln
    IMPORTING
    OUTPUT = p_vbeln
    <b>concatenate '%' p_vbeln '%' into sdata.</b>
    select single docnum from edid4 into l_docnum
                  where sdata like <b>sdata.</b>
    if sy-subrc = 0.
    write edid4-docnum.
    else.
    write ' the record is not found'.
    endif.
    Thanks
    Seshu

  • How to read a file and save the line number of  the last line read?

    Hi,
    I am using RandomAccessFile and file as my class. I am trying to read a log file as it gets updated and print it out to a java window. i so far have the framework setup but dont know how to save the last line number so.
    i need this variable so i dont reprint out the same line numbers to the java window. please advise.
    thanks!

    hi,
    i now have the line number of the last line read, but now when i reopen the file, how can i skip that number of lines?
    thanks,

  • How do I get the line number of the sales order and how do I save info?

    I am trying to create a form that is able to be called from a right click on the sales order matrix and will display some of the user defined fields associated with the line.
    I've managed to create a form and add a menu option to the right click but I'm now stuck because of the following:
    1. How to I know which line the user selected? I need the REAL Line Number from the RDR1 table because I need to use it on the data filter of the form.
    2. I hard coded a line to just to see if I can load a form and it appears to load and bind the data to the controls, but how do I save changes made? There are several text fields, combo boxes, and a picture control.

    Hi Coleman,
    1. The pVal returned form a menu event does no provide the LineId, but a pVal from a Item Event does. I suggest you use a DoubleClick or Control + Click on the Line to trigger an event that you can catch and use to launch your form.
    2. Please note that if the Sales Order line is closed you'll not be able to update the values. If it's not, then you need to instantiate a Sales Order document, get the correct document with the GetByKey method and update whatever fields you need.
                    Dim oSalesOrder As SAPbobsCOM.Documents = oCompany.GetBusinessObject(BoObjectTypes.oOrders)
                    If oSalesOrder.GetByKey(docentry) = True Then
                        oSalesOrder.Lines.SetCurrentLine(pVal.Row - 1)
                        oSalesOrder.Lines.UserFields.Fields.Item("U_MyUDF").Value = ""
                        oSalesOrder.Update()
                    End If
    Regards,
    Vítor Vieira

  • Scanner(Warning) : 027: Unable to read the sequence number from the Workstation object.

    Hi
    We are having trouble storing inventory scans from some workstations.
    We have a windows ONLY environment, with middle tier servers. (ZEN65SP1,
    W2KSP4).
    Some workstations are storing fine. The Storer function is working and we
    can see the storer functions for the 'good' workstations in the Inventory
    service window.
    However some workstations can't store to the inventory db, but DO populate
    eDir ZENworks inventory 'minimal information' but show "Scanner(Warning) :
    027: Unable to read the sequence number from the Workstation object." in
    the Scan Status...
    The Inventory service window shows no attempt by these workstations - it's
    almost as though the scan file is not arriving (though eDir knows/displays
    the scan file name)
    How does the workstation access the scandir in Windows only/middle tier
    environment? Does the scan xml stream get sent to the MT via http and then
    on to the scandir via CIFS?
    Any suggestions/explanations welcome!!
    Many thanks
    David

    David,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • 027: Unable to read the sequence number from the Workstation object

    Environment:
    NW 6.5 sp4
    Zen 6.5 sp1
    We had a problem with our inventory server processing .STR files a couple
    months ago - had to turn off inv. policies on workstations while we resolved
    it. Now it's resolved and we're running inventory again. We have a large
    number of workstations reporting this error:
    027: Unable to read the sequence number from the Workstation object
    They have no data in the DB, although they do have minimal scan info, and
    the last scan status date matches that of the sequence number error.
    I've seen this sporadically in the past and have been able to resolve it by
    initiating a full scan on the individual workstation. However, that does
    not seem to be making a difference this time.
    Novell's troubleshooting document basically says see if the server's
    running, and see if there's data for the workstation in the db. Then call
    tech support.
    Any other ideas?
    ~~~Nicoya...

    Jared wrote:
    > Nicoya Helm,
    >
    >> 027: Unable to read the sequence number from the Workstation object
    >
    > I am thinking that this can also mean a previous full scan was not
    > found. Or maybe the STR file name is bad.
    >
    > This information is stored here
    > HKEY_LOCAL_MACHINE\Software\Novell\Workstation
    > Manager\InvScanner\"STRFileName"
    The machines I'm troubleshooting have valid formats for their STR names,
    but that doesn't necessarily mean they are valid STR sequence numbers.
    Does removing the value in the reg key cause the STR file name to be
    recreated?
    >
    > Because imaging is used, it's possible that this information is matching
    > on some machines which could cause problems.
    I've verified that none of our images contain the c:\zenworks history
    folder, and we run a script that cleans up any zenworks items before
    sysprep (i.e. makes sure there's no registration info on the
    workstations, etc). Our imaging scripts also clear any ZIS info to
    avoid any duplication as well, so I don't think imaging would be causing
    this.
    > I believe 6x also has a hist.ini file like 3x inventory does, you might
    > delete the file also.
    Good tip about the hist.ini file, I didn't know about that. It does not
    solve the sequence number error, but it does seem to force a full scan
    of the system and cause the new scan to be stored in the DB, which was
    not happening before.
    Thanks!

  • Standard program to fetch the article number from the EAN

    Hi all,
    Is there any standard report, that retrieves the article number from the EAN provided. I don't require a function module which satisfies this requirement.
    Kindly provide your valuable inputs.
    Thanks & Regards,
    Revathi.

    Here is code that can fetch any site.
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class fetchresult extends Frame implements ActionListener{
         TextField t1;
         TextArea ta;
         Button b1;
         public fetchresult(){
              super("Fetch Result");
              t1=new TextField("http://www.sitename.com",20);
              b1=new Button("Get");
              ta=new TextArea("",20,80);
              setLayout(new FlowLayout());
              add(t1);
              add(b1);
              b1.addActionListener(this);
              add(ta);
              setSize(200,200);
              setVisible(true);
         public void actionPerformed(ActionEvent e)
              try
              String s = t1.getText();
              URL u = new URL(s);
              URLConnection uc = u.openConnection();
              InputStream is = uc.getInputStream();
              BufferedReader rd = new BufferedReader(new InputStreamReader(is));
              String str;
              while((str = rd.readLine()) !=null){
                   ta.append(str);
                   ta.append("\n");
              rd.close();
              int available = is.available();
              int z;char c;
              for(int x=0;x<available;x++){
                   z=is.read();
                   c=(char)z;
                   ta.append(String.valueOf(c));
              catch(Exception ee){ta.append(ee.toString());}
         public static void main(String args[]){
              fetchresult obj = new fetchresult();
    Manu

  • Hi. I've changed my hard drive on my macbook pro and wanted to reinstall logic pro but although I took the serial number from the "about" box it rejects it when I try to reinstall. It was an upgrade to Logic 8 originally. What can I do? Urgent!

    Hello. I have installed a new hard drive on my Macbook Pro with OSX Tiger. I tried to reinstall Logic 8 Pro but it refuses the serial number when I try to install it. I took the serial number from the "About" box when Logic was still installed but no good. The software was originally an upgrade, and I don't think I have the disks for the previous version. What do I do? This is important because I only use the computer for music. Thank you.

    There's actually an even simpler solution that doesn't include buying a new version of Logic.  He can use his original version easily.  Of course, that depends if the OP knows how to effectively use his computer though...

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • How can i remove the phone number from the text messages that i receive in the notification center

    how can i remove the phone number from the text messages that i receive in the notification center?

    You choose whether to see text messages in Notification Center or not.  If you elect to see them, they will display the phone number (unless they are from a contact in your contacts list).
    You can choose not to see them at Settings > Notification Center > Messages.

  • How to hide the PORT NUMBER from the URL

    Hi,
    We have Application on Node 1 and Database on Node 2
    Apps Version: 11.5.10.2
    DB: 9.2.0.6
    We recently added a new node to act as web server for iSupport.
    Now we are able to access the url using public Ip-address which looks like
    http://<Internet Ip-Address>:<PORT NUMBER>
    Eg: http://******.com:8000
    But we dont want the *'PORT NUMBER(8000)'* to be displayed.
    How to hide the port number ?..
    Thanks in Advance,
    Mahesh

    Hi Hsawwan,
    Can you plz explain me the steps how to hide the port number from the url as our network administrator is not aware of this.
    Regards,
    Mahesh

  • Created path and used trim but the line appears from the wrong side?

    Hey,
    I've created a rectangle by using the pen tool, then applied a stroke to it. I've then added "trim paths" and the end value at 0seconds is 0% and then at 5 seconds its at 100% however the line appears from the wrong side of the screen, basically it's reversed, yet the reverse path symbol is not ticked.
    The line is meant to appear from left to right of the screen with a 2px stroke, which will then have a mask applied to show a large black box appear from this line and fill the rest of the screen up.
    Anyone able to help me at all?
    Thank you.

    If you animated the start then animate the end. Simple as that.

  • Search for a word and return all the  lines (row) from the text file..

    Hi all,
    I need a help on how to search a string from the text file and returns all the lines (rows) where the searched string are found. I have included the code, it finds the indexof the string but it does not return the entire line. I would appreciate your any help.
    public class SearchWord
         public static void main(String[] args){
         //Search String
         String searchText = "man";
         //File to search (in same directory as .class file)
         String fileName = "C:\\Workspace\\MyFile.txt";
         //StringBuilder allows to create a string by concatinating
         //multiple strings efficiently.
         StringBuilder sb =
         new StringBuilder();
         try {
         //Create the buffered input stream, which reads
         //from a file input stream
         BufferedInputStream bIn =
         new BufferedInputStream(
         new FileInputStream(fileName));
         //Holds the position of the last byte we have read
         int pos = 0;
         //Holds #of available bytes in our stream
         //(which is the file)
         int avl = bIn.available();
         //Read as long as we have something
         while ( avl != 0 ) {
         //Holds the bytes which we read
         byte[] buffer = new byte[avl];
         //Read from the file to the buffer
         // starting from <pos>, <avl> bytes.
         bIn.read(buffer, pos, avl);
         //Update the last read byte position
         pos += avl;
         //Create a new string from byte[] we read
         String strTemp =
         new String(buffer);
         //Append the string to the string builder
         sb.append(strTemp);
         //Get the next available set of bytes
         avl = bIn.available();
         catch(IOException ex) {
         ex.printStackTrace();
         //Get the concatinated string from string builder
         String fileText = sb.toString();
         int indexVal = fileText.indexOf(searchText);
         //Displays the index location in the file for a given text.
         // -1 if not found
         if (indexVal == -1)
              System.out.println("No values found");
         else
              System.out.println("Search for: " + searchText);     }
    }

    Hi, you can use servlet class and use this method to get the whole line of searched string. You can override the HttpServlet to treat that class as servlet.
    public class ReportAction extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    //write your whole logic.
    BufferedReader br = new BufferedReader(new FileReader("your file name"));
    String line = "";
    while(line = br.readLine() != null) {
        if(line.contains("your search string")) {
            System.out.println("The whole line, row is :"+line);
    }

  • CS2. Where do I find the serial number from the Download. Please Help.

    I have a Disk version of my old CS2 and there is no longer validation service for it by phone nor by e-mail. So I uninstalled it and now that I downloaded it from adobe's site,I can't find the serial number, and the one from the original box it's saying that it is not valid. Any help would be greatly appreciated.
    Thanks

    you're welcome.
    just in case:
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  DC | XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13, 12, 11, 10| 9,8,7
    Lightroom:  5.7.1| 5 | 4 | 3 | 2.7(win),2.7(mac)
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
    window using the Lightroom 3 link to see those 'Important Instructions'.

Maybe you are looking for