cancel
Showing results for 
Search instead for 
Did you mean: 

empty fieldSeparator

Former Member
0 Kudos

Hi Guys,

I am using PI7.0 SPS14, and I would like to use the receiver file content conversion to generate a flat file.

My structure is the following :

<struc1>

<field1>value1</field1>

<field2>value2</field2>

....

<field289>valueX</field289>

<struc1>

<struc1>

<field1>value3</field1>

<field2>value4</field2>

....

<field289>valueY</field289>

<struc1>

As you can see there are plenty of fields, so I don't want to use the usedFixedLength parameter, but I would like to create the flat file with all the fields in a row with no separators such as :

Value1Value2....ValueX

Value3Value4....ValueY

Has any one a clue of how we can do this ? I have thought about creating a dummy fieldSeparator like ";" and then run a script to erase all the ";" in the file but that is not a "clean" solution.

Thanks for your help,

Best regards,

GL

Edited by: Guislain Libessart on Dec 3, 2008 10:44 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

I dont think there is a standard way for this.

A workaround;

You can have another mapping after the current mapping. take the output structure of the current mapping you have and then map it to a target structure as;

<NodeA>

<AllFields>AABBCC............................XXYYZZ</AllFields>

</NodeA>

<NodeA>

<AllFields>AA1BB1CC1............................XX1YY1ZZ1</AllFields>

</NodeA>

Ie. concatenate all your fields into one field and then use the content conversion on this target XML.

Former Member
0 Kudos

Thanks for the clue, but concatenate 289 fields with the graphical tool is just impossible, do you know an easy way of doing it with a java mapping ? Otherwise I will go for a batch at the end of the flat file processing.

Best regards,

GL

Former Member
0 Kudos

HI

As said above

There is no standard way. AS if you define FCC parameter you need to use some field name and field length

You can do this by changing your graphical mapping to Java mapping or XSLT.

If you like to use Java mapping. Add all the concurrent nodes under Struct to array and pass concatenate them and create target node.

Thanks

Gaurav

Former Member
0 Kudos

Hi,

What kind of mapping did you have in mind?

If you wouldn't number the "field" & "struc" fields, you can use a function to run through the fields

<struc>
<field>value1</field>
<field>value2</field>

You can do this within xslt or with a Java function.