Quantcast
Viewing all articles
Browse latest Browse all 1306

FCC with input as a single string

Hello All,

I am working on a feasibility check to convert a conversion agent code using PI's built in features. I find myself stuck in one such case and need your expert advice:

 

The file in consideration appears as below:

HDR12345ADD8908ADD8908ITM34567ITM34567

 

HDR marks the beginning for Header - which is followed by a 5 number of constant fields

ADD marks the beginning for Address - which is followed by 4 number of constant fields

ITM marks the beginning for Item - which is followed by 5 number of constant fields.

 

The recordsetStructure looks as below: HEADER,1,ADDRESS,*,ITEM,* i.e. each line can have multiple addresses and items

 

The desired output is:

 

<MT_DATA>

    <RECORD>

         <HEADER>

              <VALUE>12345</VALUE>

         </HEADER>

         <ADDRESS>

              <VALUE>8908</VALUE>  

         </ADDRESS>

         <ADDRESS>

              <VALUE>8908</VALUE>  

         </ADDRESS>

         <ITEM>

              <VALUE>34567</VALUE>  

         </ITEM>

         <ITEM>

              <VALUE>34567</VALUE>  

         </ITEM>

      </RECORD>

</MT_DATA>

 

The problem I am facing right now is that if my input had HDR, ADD and ITM on different lines, my FCC works well. However if they are in the same line, I am only able to read only the HDR and the rest seems to be ignored. I am finding it hard to believe that a string without a nl cannot be  addressed in FCC.

 

Regards,

KN


Viewing all articles
Browse latest Browse all 1306

Trending Articles