| Carol Rico 2004-02-08, 8:42 am |
| If the record tags '1' and '2' are in fixed positions in
the record (e.g. always in position 80 in the parent
record and always in position 130 in the child record),
then you can define 2 record types, one Parent record and
one Child record within a group. You specify the position
of the record tag in 'Source Tag Position' in the Parse
tab in Biztalk Editor. You can then map to the xml doc as
usual.
If the record tags '1' and '2' are not in fixed positions
in the record, you'd need to do 2-step mapping:
In the first map, you define only 1 record with no record
tag and all the data in 1 field e.g. DataField. On the
output side, you define 2 fields in this order: TagField,
DataField. Setup a String-Right functoid to get the last
character in DataField. Map this last character to
TagField. Map DataField to the output DataField without
the last character.
In the second map, you can then define 2 record types
because you now have the record tags '1' and '2' in a
fixed position in the beginning of the record and you can
proceed with mapping to the xml doc.
Hope this helps,
Carol
>-----Original Message-----
>I have a mapping Req and am not able to do with = and
>value mapping functiods and any one can help me
>I have a input positional flat file and want XML output
>input PARENT1DATA1
> CHILDCDATA2
> CHILDCDATA2
> CHILDCDATA2
> PARENT2DATA1
> CHILDCDATA2
> CHILDCDATA2
>The last character in each line in input like 1,2 are 1
>for parent and 2 for child
>here is output XML how i wanted
>
> <Record>
> <PARENT id="PARENT1DATA">
> <CHILD id="CHILDCDATA">
> <CHILD id="CHILDCDATA">
> <CHILD id="CHILDCDATA">
> </PARENT>
> <PARENT id="PARENT2DATA">
> <CHILD id="CHILDCDATA">
> <CHILD id="CHILDCDATA">
> </PARENT>
> <Record>
>
>ANy help appreciated
>.
>
|