Delivery Routines
Delivery Routines
No part of this document may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of TEMENOS Holdings NV.
Table Of Content
Table Of Content.................................................................................................................................... 2
Introduction............................................................................................................................................. 3
The Need For A Delivery Routine........................................................................................................... 3
Example 1........................................................................................................................................... 4
Solution1............................................................................................................................................. 4
Summary................................................................................................................................................ 8
Introduction
The main processes within Delivery, i.e. mapping, formatting and the carrier control processes, are run
as phantom jobs, normally running continuously throughout the day and during the end of day
processing, only being stopped for the backups to be taken.
The mapping process DE.O.MAP.MESSAGES examines the Unmapped queue in chronological order
for any messages to be mapped. From the raw data in the Unmapped file, a Header record and a
Message Detail record are created, using the mapping rules described on the Mapping table
DE.MAPPING. The message is then placed on the unformatted queue.
The formatting process DE.O.SELECT.NEXT.MESSAGE examines the unformatted queue, in
chronological order within priority for any messages to be formatted. The appropriate Product record
DE.PRODUCT is read to determine to whom the message should be sent, how many copies and
which carrier should be used. The carrier, as specified on the product table, is used to access the
carrier table, DE.CARRIER. This file contains the carrier to be used for formatting, address table look-
ups, the carrier module and the interface to be used. E.g. the product table specifies a carrier of
TELEX. The carrier record specifies for telex that “TELEX” should be used for the address record look-
ups, “SWIFT” should be used for formatting, the “GENERIC” carrier control program should be used
and the interface should be “TELEXBOX”. The Address table DE.ADDRESS is accessed to determine
the address to which the message should be sent, e.g. the print address, the SWIFT id, the Telex
number, etc. The appropriate format table (e.g. DE.FORMAT.PRINT, DE.FORMAT.SWIFT) is read to
determine how the message should be formatted, producing a formatted print message, formatted
SWIFT message, etc. The formatted message is then placed on the appropriate Formatted queue e.g.
Formatted SWIFT, Formatted Print, etc.
Example 1
Ensure that, for all delivery messages of type 320 which are generated by the LD application when a
deposit is made into a customer’s account contains the customer’s account officer name in the advice
apart from the existing details.
Solution1
Step 1
Define the field that has to hold the account officer id in DE.MESSAGE.
Step 2
Write a routine that will pick up the account officer for that specific customer from the customer file.
The customer id is available in the ‘2.1’ position of the handoff record (DE.O.HANDOFF). Extract this
id from the handoff record, using this open the customer file and extract the account officer. Return
this extracted vale to the handoff record (populate in the ‘9.2’ position in the record).
A delivery routine takes 2 input parameters. A dimensioned array that holds the contents of the
APPLICATION.HANDOFF and a variable to hold the error code if any. The first parameter is prefixed
with a MAT in the routine, as it has to hold the same dimensions as that of the
APPLICATION.HANDOFF. This variable is also the output parameter as it is returned to the delivery
system once the program finishes execution.
$INSERT I_F.CUSTOMER
Y.CUS.ID = 0
R.CUS.REC = ‘’
FN.CUSTOMER = 'F.CUSTOMER'
F.CUSTOMER = ''
CALL OPF(FN.CUSTOMER,F.CUSTOMER)
Y.CUS.ID = HANDOFF.REC(2)<1>
CALL F.READ(FN.CUSTOMER,Y.CUS.ID,R.CUS.REC,F.CUSTOMER,ERR1)
HANDOFF.REC(9)<2> = R.CUS.REC<EB.CUS.ACCOUNT.OFFICER>
RETURN
END
Step 3
Map it to the appropriate array position in DE.O.HANDOFF. It is advisable to use the 9 th or the 10th
array in DE.O.HANDOFF to populate new values. This example uses the 9.2 position in
DE.O.HANDOFF record.
DE.MAPPING record id is 320.LD.1. (To obtain this id, open the DE.O.HEADER with the delivery
reference id and obtain the values from Field Number 1(Message) and Field Number 2(Application
Name) and Sub classification is hard coded by default to 1.Through parameterization we can set the
value for sub classification. Parameterization is available for some applications for example LC use the
application called EB.ADVICES to set the sub classification.
Step 4
Compile and catalogue the subroutine.
Step 5
Attach this routine to the DE.MAPPING table in field number 11.Prefix the routine with a “@” symbol. It
doesn’t need an entry in the PGM.FILE
Step 6
Step 7
Step 8
Input the LD transaction, which will deposit GBP 1000 into ABN Amro’s account (Customer Number:
100069).
Step 9
Authorize the LD transaction.
Step 10
Retrieve the Delivery Reference Number from LD record.
Step 11
Using the Delivery Reference Number open DE.O.HANDOFF and check whether the value has been
populated.
Step 12
Using the Delivery Reference Number open the DE.O.HEADER and check the disposition. The
disposition has to be ‘FORMATTED’.
Step13
Using DE.MM.PRINT.MSG application and view the advice.
Summary
A delivery routine is used to fetch data not available in the APPLICATON.HANDOFF so that it
can be displayed in the delivery advice.
A delivery routine needs to be attached to the DE.MAPPING application preceded with ‘@’
A delivery routine takes in 2 input parameters. A dimensioned array that will hold the data in
APPLICATION.HANDOFF and a variable to return the error code.
Use SEE.HANDOFF followed by the delivery reference id to see the contents of the
APPLICATION.HANDOFF
Use DE.MM.PRINT.MSG to view a delivery advice once it has been generated.
Use DE.MENU to start/stop delivery phantoms.