MT 950 Splitter Map example overview

The example maps split a large MT950 Statement message and generate multiple, smaller MT950 files.

For each of the smaller files the example maps recalculate running balances, and maintain the message sequence number within the overall statement number. Both example maps work on the following algorithm:

Variables names match the map input card names:

  • n - Indicates the number of statement lines in each target message. The default is 30, but this parameter can be adjusted as necessary, based on the average expected size of a statement line.
  • t - Indicates the number of lines in the source message. This value is calculated by the map using COUNT.
  • T - Indicates total number of target messages. Calculated as INT(t/n)+1
  • x - Indicates current target message number iteration (incremented by the map).

As an example: n=30, t=70, then T=INT(70/30)+1=3

therefore, three target messages are needed

The Target lines are built for each iteration using EXTRACT on the source message statement line's INDEX:

=EXTRACT ( StatementLine #61 General Field WHERE

INDEX ( StatementLine #61 General Field ) >= (n*(x-1)+1 &

INDEX ( StatementLine #61 General Field ) <= x*n )

mt950_split is executed as a recursive map until x > T

mt950_split_v2 is excuted T times using CLONE to control the iteration.