Skip to Content
author's profile photo Former Member
Former Member

File Content Conversion Problem: Sender File Adapter

Hi All,

In Sender File Adapter, how to spilt the single line into different lines using + as a separator. Plz see below my source file.

#SMESS=IV01:672633SAP:676968:::NL51:02:11+

COPS=678713:676968:070416:IV01'3:11IVFR=678713:PDA and'IND 2'9206 AD'Dtn'INIVDA=070416IVNR=6264008195:676968add1

#EMESS=0+

In above txt file there are 3 lines.

1st line starts with #SMESS

2nd line starts with COPS

3rd line starts with #EMESS.

In 2nd line, if u observe there are 3 lines separating by +. My task is, I have to spilt the 2nd line into 3 lines using + separator.

I already used the xx.endSeparator as '+' to spilt the line but it is not working....

Could anyone help me how to do this. This is very urgent

Thnx,

Kumar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 19, 2007 at 12:58 PM

    Kumar,

    More details needed.

    1. Can you give the expected XML structure from this flat file?

    2. What are the key fields used here?

    3 Your current FCC parameters.

    4. The error you get with your current settings.

    Regards,

    Jai Shankar

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Shankar,

      1) My Expected XML Structure:

      <?xml version="1.0" encoding="utf-8" ?>

      - http://ms.com/dev/ms">

      - <Recordset>

      - <DT_SMESS>

      <D_9901>IV01</D_9901>

      <D_9902>672633SAP</D_9902>

      <D_9903>676968</D_9903>

      <D_9904 />

      <D_9905 />

      <D_9906>NL51</D_9906>

      <D_9907>02</D_9907>

      <D_9908>11</D_9908>

      </DT_SMESS>

      - <DT_COPS_2>

      <D_C022>678713</D_C022>

      <D_C023>676968</D_C023>

      <D_C008>070416</D_C008>

      <D_C111>IV01'3</D_C111>

      <D_H559>11</D_H559>

      </DT_COPS_2>

      - <DT_IVFR_2>

      <D_C024>678714</D_C024>

      <D_D333>PDA and'IND 2'9206 AD'Dtn'IN+</D_D333>

      </DT_IVFR_2>

      - <DT_IVDA_2>

      <D_D365>070416</D_D365>

      </DT_IVDA_2>

      - <DT_IVNR_2>

      <D_D189>6264008195</D_D189>

      <D_H364>676968add1</D_H364>

      </DT_IVNR_2>

      - <DT_EMESS>

      <D_D9901_1>0</D_D9901_1>

      </DT_EMESS>

      </Recordset>

      </ns:MT_IV01>

      2) I am not getting any error even if I use key Fields or Not becoz in the RecordSet Structure I mentioned DataType, 1 instead of DataType, *.

      3) FCC Parameters:

      Document Name: MT_IV01

      Document Namespace: http://ms.com/dev/ms

      Recordset Structure: DT_SMESS,1,DT_COPS_2,1,DT_IVFR_2,1,DT_IVDA_2,1,DT_IVNR_2,1,DT_EMESS,1

      Recordset Sequence: Ascending

      Key Field-type : String (Case-sensitive)

      4) Error:

      Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 2 according to structure 'DT_COPS_2':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

  • Posted on Apr 19, 2007 at 12:58 PM

    Hi Kumar,

    Instead of giving only + in the endSeparator give as below:

    xx.endseparator 'nl'+

    Try dis.

    Thanks,

    Prasanthi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 19, 2007 at 01:27 PM

    Hi Kumar,

    Try using <b>'0x2B'</b>....0x2B inside ' '

    Thanks,

    Maheshwari.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.