1 Reply Latest reply: Feb 22, 2012 8:03 AM by 908827 RSS

    File Adapter.Appending to the same file without repeating the header line.

    915322
      Hi

      I have the requirement as below.

      1. Need to create a file for a day. Means a file will be created on daily basis.
      2. Write (Append ) the data to the same file in a day.
      3. The file contains a Header Line (the field names) and multiple details lines (the required data).
      For e.g.
      FirstName,LastName,City,Bank,AccountNo
      xxxxxxx,yyyyyy,Kolkata,TTT,111111
      eeeeee,fffffffff,Delhi,SSS,222222
      4. This file should not contain any header or detail identifier. Also the Header line should not be repeated while appending to the same file. Only the detail lines should be appended.

      5. I am able to create the file on daily basis and also appending to the same file on each writing. Below are the issues I am facing
      a) Not able to avoid the Header and Details identifier using NXSD.
      b) The header line is getting repeated while appending to the file. For e.g. I am getting as below

      HDR,FirstName,LastName,City,Bank,AccountNo
      DTL,xxxxxxx,yyyyyy,Kolkata,TTT,111111
      DTL,eeeeee,fffffffff,Delhi,SSS,222222
      HDR,FirstName,LastName,City,Bank,AccountNo
      DTL,xxxxxxx,yyyyyy,Kolkata,TTT,111111
      DTL,eeeeee,fffffffff,Delhi,SSS,222222

      where as I want as below

      FirstName,LastName,City,Bank,AccountNo
      xxxxxxx,yyyyyy,Kolkata,TTT,111111
      eeeeee,fffffffff,Delhi,SSS,222222
      xxxxxxx,yyyyyy,Kolkata,TTT,111111
      eeeeee,fffffffff,Delhi,SSS,222222

      Could anyone please assist how to achieve this scenario? I am using Oracle OSB and file adapter.

      Thanks in advance.

      Edited by: user13437444 on Feb 4, 2012 8:50 AM