cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion Problem: Sender File Adapter

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kumar,

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

Thanks,

Maheshwari.

Former Member
0 Kudos

Hi Maheswari,

I already tried this Hexadecimal Option.

xx.endseparator = '0x2B'.

Rgs,

kumar

Former Member
0 Kudos

Kumar,

Can you try once by using +'nl' or '0x2B''nl'

---Satish

Former Member
0 Kudos

Satish,

I already tried all the options. Nothing is working.

Regards,

Kumar.

Former Member
0 Kudos

Hi Guys,

We have used unix script to spilt the file.

Thanx,

Kumar.

prasanthi_chavala
Active Contributor
0 Kudos

Hi Kumar,

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

xx.endseparator 'nl'+

Try dis.

Thanks,

Prasanthi.

Former Member
0 Kudos

Hi Prasanthi,

xx.endseparator 'nl'+ is not working.

Regards,

Sridhar.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Shankar,

1) My Expected XML Structure:

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

- <ns:MT_IV01 xmlns:ns="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!