Message Printing Service
You can use the FTM SWIFT Message Printing Service to send messages to a printer or to another output medium such as a file. The service collects messages in one of several print queues and, depending on configuration settings for that queue, either prints each message immediately or stores them in print orders for subsequent batch printing. Messages that were already printed can be manually reprinted by an operator.
If messages are to be printed on a printer, the formatted output is sent to a configured operating system print command. For example, you can use the lpr or qprt command to send the print output to a printer. For more information about an operating system print command, see print queue attribute PrintDevice.
To include print processing in custom message flows, use the DnqPrintInputAdapter node. This node receives messages from a message flow and stores them into a print queue for processing. Messages to be printed must be in MTXML or MX format. For more information, refer to the description of the DnqPrintInputAdapter node in DnqPrintInputAdapter node.
- All fields (PrintFormatMessage=0)
- Formatted output contains
the message to be printed. Each field is formatted according to the message definition and is
preceded by a label that describes the field. This print format includes used fields (containing
data) as well as expanded tag descriptions for fields that are not used.
Figure 1. Example of an MT103 message printed using all fields format Message already printed: No Queue: MYQUEUE Msg Sequence#: 1/1 Order Sequence#: 101078 Msg Type : FIN103 UTC timestamp: 20211230 132951 ================================================================== Page 1 ===== Single Customer Credit Transfer Basic Header Application Id F APDU Id 01 LT Address IBMADEFFAXXX Session Number 0000 Sequence Number 000000 Application Header Input/Output I Message Type 103 Destination Address IBMADEFFA708 Priority N Delivery Monitoring Obsolescence period User Header Service Code 103 Banking Priority 113 MUR 108 Validation Flag 119 Payment Receiver 115 Sender's Ref. *20 TRN Time Indication 13 Option C Code Time Sign Time Offset Bank Op Code *23 Option B CRED Instruction Code 23 Option E Instruction Additional Info Tran Type Code 26 Option T Value Amt *32 Option A Date 040903 Code EUR Amount 123456789, ⋮ ========================================================= End of Msg: 1/1 ===== - Used fields (PrintFormatMessage=1)
- This format generates
the same output as the All fields format, but excludes fields that are not used. This can be
used to reduce the size of the output messages.
Figure 2. Example of an MT103 message printed using used fields format Message already printed: No Queue: MYQUEUE Msg Sequence#: 1/1 Order Sequence#: 101079 Msg Type : FIN103 UTC timestamp: 20211230 132951 ================================================================== Page 1 ===== Single Customer Credit Transfer Basic Header Application Id F APDU Id 01 LT Address IBMADEFFAXXX Session Number 0000 Sequence Number 000000 Application Header Input/Output I Message Type 103 Destination Address IBMADEFFA708 Priority N Delivery Monitoring Obsolescence period Sender's Ref. *20 TRN Bank Op Code *23 Option B CRED Value Amt *32 Option A Date 040903 Code EUR Amount 123456789, ⋮ ========================================================= End of Msg: 1/1 ===== - Line format (PrintFormatMessage=2)
- If line format is
specified, the message is printed without expanding any tag information. Line format is used for
messages that cannot be formatted correctly.
Figure 3. Example of an MT103 message printed using line format Message already printed: No Queue: MYQUEUE Msg Sequence#: 1/1 Order Sequence#: 101080 Msg Type : FIN103 UTC timestamp: 20211230 132951 ================================================================== Page 1 ===== {1:F01IBMADEFFAXXX0000000000}{2:I103IBMADEFFXXXXN}{4: :20:SendRef :23B:CRED :32A:090311EUR1,23 :50F:/ibmadeff 1/CoBa :59A:BOTKCATX :71A:OUR -} ========================================================= End of Msg: 1/1 =====
Figure 4 shows a printed message using the all fields format, including the history information.
Message already printed: Yes (1x) Queue: printq1
Msg Sequence#: 1/1 Order Sequence#: 100051
Msg Type : FIN101 UTC timestamp: 20220130 132951
================================================================================
Context Information
OU: BANKA Msg ID: 4649412e49424d4144454646412e11370001e3674aab66d2
--------------------------------------------------------------------------------
FIN: Y FMT: N
MsgDigest : Ppj2RKip48sf6nvBlGAq2n7mDqUBxxxxxxxxxxxxxxxx
MergedACK : {1:F21IBMADEFFAXXX4407123751}{4:{177:0909121118}{451:0}}
Local Address : IBMADEFFXXX
Remote Address: IBMBDEFFXXX
Network Code : ACK
Network String: {1:F21IBMADEFFAXXX4407123751}{4:{177:0909121118}{451:0}}
Comment : This is a sample comment
================================================================================
Message History
--------------------------------------------------------------------------------
UTC timestamp: 20220130 091602
Service : SDF
Function : IMPORT
Result : Ok
User : test
Queue : T1.BANKA.DNF_ILC_FIN
Destination :
--------------------------------------------------------------------------------
UTC timestamp: 20220130 101550
Service : SIPNFIN
Function : SEND
Result : Ok
User : uwmba1
Queue : T1.BANKA.DNF_SDF_FIN_PRINT_REPLY
Destination :
===============================================================================
Basic Header Appl Id F APDU Id 01 LT Addr IBMADEFFAXXX
Session 0000 Sequence 000000
Application Header Input/Output I Message Type 101
Receiver LT IBMBDEFFXXX Priority N
IBM Bank B
FRANKFURT AM MAIN
Delivery Mon. Obsolesc. period
User Header
Service Code 103 : STP
Banking Priority 113 : NORM
MUR 108 : mur
--------------------------------------------------------------------------------
Sequence A : Common Elements
Sender's Ref *20 : sender reference sdf011-01
Customer Ref 21 R : CustRef
Msg Index/Total *28 D : 0001 / 0002
⋮
Individual configuration can be set for each print queue which allows to use different printers or different print formats. For example, if it is required to have a physical printout of messages and to store the messages also in files, you can define one print queue for hardcopy output and another queue which will print to files.
PrintOptions configuration attributes for a print
queue. The following example sets a configuration file for the print queue
PrintQExt.
add -ou OU1 -co PrintQExt -ct DnqPrintQueue -attr PrintOptions -val /var/ftm/swift/v324/run/prtoptions.xml
com -ou OU1
dep -ou OU1<?xml version="1.0" encoding="UTF-8"?>
<PrintOptions PrintDeviceType="PRINTER"
PrintLineLength="92"
PrintPageLength="61"
PrintFormatHeader="0"
PrintFormatMessage="2"
BICExpansion="Yes"
>
<PrintDevice>lpr -P MyPrinter</PrintDevice>
</PrintOptions>
- The file extension of the external configuration file must be
.xmlin order to be recognized. - The configuration files are not subject to FTM SWIFT security controls and you must ensure that modifications of the file are protected.
- If a configuration file is set, its content is evaluated each time a new print job is started.
If an error occurs during print processing, any pending operations are rolled back and processing is stopped. Use the start command in system operation service to restart message processing.
A substitution character that is specified by the default character set of the Java™ virtual machine used by the message broker will be printed for characters that are not in the default character set. For example, a question mark (?) will be printed for characters included in comments of a message which contain characters which are not in the default character set.