how should I interpret the MT940 specifications

992 Views Asked by At

I'm building my own MT940 parser and I'm running into something that seems to be unspecified issue.

The specification of a :61: tag, states that it ends with a variable amount of characters (34x). From an example file I see that they can continue on the next line.

For example:

:61:1510151015C54,01NTRFNONREF//15288910043499
/TRCD/00100/

How do I determine if the next line is a new tag or if it is a continuation of the content of the preceding tag. It seems that looking for an :xx: pattern at the beginning of the line is naive as it could cause a bug in the exceptional situation where the content actually contains that specific pattern.

1

There are 1 best solutions below

4
On BEST ANSWER

Every line that starts with a tag such as :61: is a new line of information in the format. If it doesn't start with such an tag then it's a continuation.

Small word of warning though. MT940 is a standard, but there are subtle differences per bank. So it might be that works for one, but doesn't work for another. For instance some specifications have a header that defines that start of a transaction, but others don't.