cancel
Showing results for 
Search instead for 
Did you mean: 

"Floating" format to XI

Former Member
0 Kudos

Hi all,

I'm sending a flat file to the XI via the File adaptor.

My problem is that the data format is a "floating format" build op like this:

<i>&field number (in a general interface structure)field content</i> - se example bellow

”<b>&03</b> ident7898<b>&06</b> Onsdag<b>&09</b> 01012006<b>&11</b> 000000265

Hov could i make XI understand this format?

Thank you in advance

Best regards, Thomas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Different ways:

my fist proposal way it's to consider the file as a comma separated file (separated from "&").

than you will have this XML:

<field>03ident7898<field>

<field>06 Onsdag<field>

<field>09 01012006<field>

<field>11 000000265<field>

Than you can have a first mapping that complete the structure:

<FIELD_03>

ident7898

</FIELD_03>

<FIELD_06>

Onsdag

</FIELD_06>

<FIELD_09>

01012006

</FIELD_09>

<FIELD_11>

000000265

</FIELD_11>

Than the another mapping, the real one, that will manage the final mapping.

Regards,

Sandro

Former Member
0 Kudos

Hmmm - Not a bad idea with the comma seperated approach, but since the records are "generic" i would never know weather the first field would be "&03ident7898" or "&01xxxx".

wouldn't I have to do a check on the <i>fieldnumber-field</i> in order to do the mapping?

Thank You

Former Member
0 Kudos

The mapping can contain an advanced function that scan the entire queu looking for requested field:

<field>03ident7898<field> -> REC_03

<field>06 Onsdag<field> -> REC_06

<field>09 01012006<field> -> REC_09

<field>11 000000265<field> -REC_11

Sandro

Former Member
0 Kudos

OK - thank You,

So I should write a user function wit the following logic for each source field:

If substr(1-2) is 01 then map to taget field 01

If substr(1-2) is 02 then map to taget field 02

and so on?

Thanks

Former Member
0 Kudos

If you have few fields (less then 20) you can use an custom function with visibility to "'Context" and give all the iput fields to this function.

The function can search for the specific key (parametric: 01, 02 and so) in the whole queue. When the key is found yuo can make the substr.

Regards,

Sandro