“BizTalk Accelerator for SWIFT” documentation has a detailed document which outlines the steps required to processes 1 SWIFT message per file. I am only adding few things we need to do to process multiple messages from a single file. The file may also contain messages of different types.
SWIFT Disassembler Pipeline Component Properties :
Set “Fragmentation” to TRUE
Set “Inbound Debatching” to TRUE
This set of property will create separate output files of one message per file i.e. input file with 4 SWIFT messages will create 4 different output files.
Format of input SWIFT messages :
Common mistake that everyone does is to separate messages with a Carriage Return (CRLF). By default BizTalk will not handle CRLF between messages but handling of CRLF is also possible. Below is a sample of two SWIFT message of type MT517.
{1:F01BOFAUSNYJXXX4321000123}{2:I517BANKDEFFAXXXN2020}{3:{103:CAD}}{4:
:16R:GENL
:20C::SEME//Reference
:23G:CANC/CODU
:95P::AFFM//BICCBIB1BI1
:16R:LINK
:20C::PREV//Reference
:16S:LINK
:16S:GENL
-}{5:{MAC:23456789}{PAC:23456789}{CHK:123456789012}{SYS:1231313}{TNG:}{PDE:12345}{DLM:}} {1:F01BOFAUSNYJXXX4321000123}{2:I517BANKDEFFAXXXN2020}{3:{103:CAD}}{4:
:16R:GENL
:20C::SEME//ReferenceMaxLn16
:23G:CANC/CODU
:95P::AFFM//BICCBIB1BI1
:16R:LINK
:20C::PREV//Reference
:16S:LINK
:16S:GENL
-}{5:{MAC:23456789}{PAC:23456789}{CHK:123456789012}{SYS:1231313}{TNG:}{PDE:12345}{DLM:}}