Fundamentals of Electronic Messages

The structure of a message - i.e. the sequence of output tags - is prescribed by the product. However, exactly how these tags are filled and whether these have to be output at all, can be handled differently from one installation to the next.

For this reason, message structure rules are defined at Level 2, whereas rules governing how tags are filled are defined at Level 5.

As a rule, no direct print commands are to be used with the message structure. Each tag is to be output using a “text function”.

Vertical spacing

Technical point: the basic “print” command automatically produces vertical spacing at the end if “print” is not followed by a semi-colon after the last part to be issued.

Electronic messages are comprised of various rules that mutually reference each other. This makes the control of vertical spacing important.

There are two types of vertical spacing in electronic messages:

The agreement is that a rule that outputs a complete tag should also output a final vertical space as part of the tag.

In order to help developers and support staff immediately identify whether a rule either outputs a part of a tag and/or tag content or part of a message (i.e. tag including content and final closing vertical space), a new terminology would be helpful.

The Typical Sequence of the Standard in the Text Function

print SWTPrtFmtBlk( “:42M:”, LEDGRP\BLK\MIXDET ) ;
print SWTPrtFmtBlk( “:42P:”, LEDGRP\BLK\DEFDET ) ;
print SWTPrtTagField( “:43P:”, LEDGRP\REC\SHPPAR )
print SWTPrtTagField( “:43T:”, LEDGRP\REC\SHPTRS ) ;
print SWTPrtTagField( “:44A:”, LEDGRP\REC\SHPFRO ) ;
print SWTPrtTagField( “:44E:”, LEDGRP\REC\PORLOA ) ;
print SWTPrtTagField( “:44F:”, LEDGRP\REC\PORDIS ) ;
print SWTPrtTagField( “:44B:”, LEDGRP\REC\SHPTO ) ;
print SWTPrtTagDate( “:44C:”, LEDGRP\REC\SHPDAT ) ;

This makes the rules legible and enables them to be easily compared with the SWIFT/TCO/DTA manuals.