none
EDI Mapping RRS feed

  • Question

  • I need to split the same file into multiple different files based on the ITM value specified above. For example if am receiving 

     

    SHP 197685220 20110713 121953 980313737290

    ORD 80075264

    ITM 4  00000000 Sony  635753483420 5 EA B  321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    ITM 5  00000000 Sony  635753483420 5 EA B  321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    ITM 6  00000000 Sony  063575348789 5 EA B  321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

     

    If you see ITM 4 and ITM 5 have the same value 635753483420 where as the ITM 6 has different value 063575348789 

    Now I must split the file into two different files. The first file being like this, 

     

    SHP 197685220 20110713 121953 980313737290

    ORD 80075264

    ITM 4  00000000 Sony  635753483420 5 EA B  321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    The second being like this,
    SHP 197685220 20110713 121953 980313737290
    ORD 80075264
    ITM 6  00000000 Sony  635753483420 5 EA B  321548764131
    SLI 252011422 252011422 252011422 252011422 231871364
    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364
    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364
    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364
    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364
    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364
    Can someone tel me how to achieve this??
    Wednesday, July 27, 2011 2:21 PM

Answers

  • I think you yill need to create a custom pipeline to do this. Basically what the pipeline should do is the following: take the raw message which is binary array, convert it to its string representation (which you pasted above), and you will need to create an algorithm to detect whether it'd need to be split or not. If need be then yout code will need to actually split the message. In this case pipeline will need to modify the original message for it to be the first file, and it would also need to enqueue a second message corresponding to the second. file.

    Please refer to the BT SDK as to how to create custom pipeline components. There are also plenty of samples out there.

    Other way would be to have the single XML representation of this file be available to a pipeline. In that case you'd be dealing with XML manipulation instead.

    HTH


    C#/BizTalk 2010 Developer
    Sunday, July 31, 2011 5:16 PM

All replies

  • I think you yill need to create a custom pipeline to do this. Basically what the pipeline should do is the following: take the raw message which is binary array, convert it to its string representation (which you pasted above), and you will need to create an algorithm to detect whether it'd need to be split or not. If need be then yout code will need to actually split the message. In this case pipeline will need to modify the original message for it to be the first file, and it would also need to enqueue a second message corresponding to the second. file.

    Please refer to the BT SDK as to how to create custom pipeline components. There are also plenty of samples out there.

    Other way would be to have the single XML representation of this file be available to a pipeline. In that case you'd be dealing with XML manipulation instead.

    HTH


    C#/BizTalk 2010 Developer
    Sunday, July 31, 2011 5:16 PM
  • Hi,
     
    Maybe I miss the point, but this is easily done within an orchestration. Do you need further informations?
     
    Thanks, regards
     
    Joerg Fischer
     
     
    "prav2483" schrieb im Newsbeitrag news:ef24b535-9f59-4570-add1-4d6a79759c76...

    I need to split the same file into multiple different files based on the ITM value specified above. For example if am receiving

     

    SHP 197685220 20110713 121953 980313737290

    ORD 80075264

    ITM 4 00000000 Sony 635753483420 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    ITM 5 00000000 Sony 635753483420 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    ITM 6 00000000 Sony 063575348789 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

     

    If you see ITM 4 and ITM 5 have the same value 635753483420 where as the ITM 6 has different value 063575348789

    Now I must split the file into two different files. The first file being like this,

     

    SHP 197685220 20110713 121953 980313737290

    ORD 80075264

    ITM 4 00000000 Sony 635753483420 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    The second being like this,
    SHP 197685220 20110713 121953 980313737290
    ORD 80075264
    ITM 6 00000000 Sony 635753483420 5 EA B 321548764131
    SLI 252011422 252011422 252011422 252011422 231871364
    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364
    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364
    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364
    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364
    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364
    Can someone tel me how to achieve this??

    Jörg Fischer
    Tuesday, August 9, 2011 12:31 PM
  • Hi Jorg,

    Yes, I would like to know more information on how I do within an orchestration, if possible any sample code can also be greatly helpful for me.

    Thanks

    Wednesday, August 10, 2011 1:19 PM