Skip to Content
avatar image
Former Member

empty fieldSeparator

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 03, 2008 at 09:49 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 03, 2008 at 09:50 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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