Announcement Announcement Module
No announcement yet.
Tricky file format handling - Multiple Item header and footer Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tricky file format handling - Multiple Item header and footer


    I have a tricky requirement to handle. Let me put the requirements first.
    1. The file should consist of fixed number of records
    2. The records to be written are sorted based on first on currency and then on the date
    3. I need to insert a batch header if the currency changes and a batch trailer when all the records for that currency are written.
    4. I need to insert a date header for any change in the date and write a date trailer when the current date processing are written.
    5. The file should have a header and footer (Can be written using header and footer callback)

    So the file format in nutshell looks like:
    File header
    Batch header (for each currency)
    Transaction header (for each value date)
    Transactions for the currency and the value date
    Transaction Trailer (for each value date)
    Batch Trailer (for each currency)
    File Trailer

    Let me know your thoughts on how this can be implemented.
    Last edited by himanshu_mps; Jun 7th, 2013, 12:58 AM. Reason: Spelling mistakes