Originally posted by: Ristonen
Hi
I have an ITX9.0 map, where input is a Cobol file like
01 ROW.
05 MESSAGE OCCURS 10 TIMES.
10 MSG-CODE1 PIC X(2).
10 MSG-CODE2 PIC X(2).
10 MSG-TXT PIC X(35).
Output is a XML text field, max-size 70 characters.
The idea is to move 1 or 2 MSG-TXT fields to XML-field.
If there is a field, that has
MSG-CODE1(ind) = '70' and MSG-CODE2(ind) ='S1'
then we move MSG-TXT(ind) to XML-NAME
If there is also a field, that has
MSG-CODE1(ind) = '70' and MSG-CODE2(ind) ='S2'
then we add MSG-TXT(ind) to existing XML-NAME.
I have now a sentence:
=F1_Nm(EXTRACT(MESSAGE,(MSG-CODE1="70" & MSG-CODE1="S1")| (MSG-CODE1="70" & MSG-CODE1="S2")))
And in F1_Nm
=Out+ MSG-TXT
After this sentence in the output there is only the first MSG-TXT.
Example:
MSG-CODE1(1) = '70' and MSG-CODE2(1) ='S1' MSG-TEXT(1)='Name1'
MSG-CODE1(1) = '70' and MSG-CODE2(1) ='S2' MSG-TEXT(1)='Name2'
=> in the output there is only 'Name1'.
It should be 'Name1Name2'
I suppose this has worked in wtx8.2, but I am not sure.
Have you any idea how I should resolve this?
Regards Risto
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange