on 12-03-2008 9:44 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.