Temenos T24 Template Programming V 4.0
Temenos T24 Template Programming V 4.0
Temenos T24 Template Programming V 4.0
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 Contents
1 Introduction....................................................................................................................................... 3
2 Creating an Application .................................................................................................................... 4
2.1 Naming...................................................................................................................................... 4
2.2 Step 1 - Defining the Application............................................................................................... 4
2.3 Step 2 - Define the Fields (.FIELDS) ........................................................................................ 7
2.4 Step 3 – Artefact Creation using EB.DEV.HELPER ............................................................... 16
2.5 Step 4 – Adding Business Logic to the Application ................................................................ 17
2.6 Step 5 – Creating the Data Access Service............................................................................ 20
2.7 Other Considerations .............................................................................................................. 26
3 The Infrastructure ........................................................................................................................... 27
3.1 Introduction ............................................................................................................................. 27
3.2 Screen Management............................................................................................................... 27
3.3 Data Entry Functions .............................................................................................................. 27
3.4 Security Management ............................................................................................................. 27
3.5 Validation ................................................................................................................................ 28
3.6 Main File Maintenance............................................................................................................ 28
3.7 History Maintenance ............................................................................................................... 28
3.8 Transaction Journaling and System Recovery ....................................................................... 28
3.9 Audit Trail ................................................................................................................................ 28
3.10 Close of Business Processing............................................................................................. 29
4 Appendices..................................................................................................................................... 30
4.1 Appendix 1 - Glossary............................................................................................................. 30
4.2 Appendix 2 - Development Artefacts ...................................................................................... 31
4.3 Appendix 3 - Program Flow ................................................................................................... 32
4.4 Appendix 4 – Older Templates ............................................................................................... 35
1 Introduction
T24 has an extensive infrastructure in place that enables the rapid development of business
components. The creation and maintenance of T24 applications is based on a series of templates,
which have had numerous incarnations throughout the life of T24. Now in it’s fourth iteration, this
document details how applications are created in a step by step process. For an understanding of the
genesis of the templates, refer to the appendix “Older Templates”. This document does not explain the
process of the previous release of the templates – refer to “Template Programming V3”.
T24 is based on a one to one relationship between the data fields on the screen and the data fields in
a file. The only way to enter data into T24 is via an APPLICATION which records the data entered and
stores it in an associated file, field by field.
There are the following stereotypes:
• Application allows the full functionality of T24: data entry, authorisation, deletion, history
restore, etc. e.g. CUSTOMER
• Display is used to simply view the data on a file maintained by the system rather than the
user e.g. STMT.ENTRY
• Utility allows data entry and a Verification function which initiates a process, e.g.
ENQUIRY.REPORT which records the selection criteria for an enquiry and then on
Verification builds a report and spools it.
2 Creating an Application
2.1 Naming
The name of the application must be meaningful, should give some indication as to its purpose and
should be prefixed by the product code of the application, where the product code should exist on
EB.PRODUCT e.g. CR.CAMPAIGN.DEFINITION, PW.ACTIVITY, etc.
Note: The file name cannot exceed 25 characters, to allow for the addition of the company mnemonic
and the $NAU or $HIS suffix.
2.2.1 Stereotypes
There are three stereotypes to choose from depending on the type of application program:
Type Description
Application Used for all standard input programs to maintain a live, unauthorised and
history file. This template is also used for type ‘U’ programs that have a live
(H or U)
and unauthorised file but do not have a history file.
Display (L) Used for the display of a 'non-inputtable / live’ file
Utility (W) Used to allow standard input without an unauthorised file and the verify
function to execute special procedures
The stereotype of the application decides which files will be created and used. There are three files
that may be created:
1. The main file is the live file or authorised file and has no suffix.
2. The unauthorised file is suffixed with $NAU and holds the record as input or changed before it
has been authorised.
3. The history file is suffixed by $HIS and contains images of the record prior to each change.
The user inputs or amends data in the unauthorised file. Another user must then view the data and
authorise it at which point it is moved from the unauthorised file into the live file. The existing record in
the live file is moved to the history file. The infrastructure handles all the reading and writing of these
files.
2.2.2 Classifications
There are three primary classifications of application:
Classification Details
INT Installation - This covers files like COMPANY, USER, LANGUAGE, where
only one version of the file will exist regardless of the number of companies
CUS Customer - for files where the data can be shared between companies.
Primarily static information and tables.
FIN Financial - for files that hold financial level details (amounts, balances etc.)
where the data cannot be shared with other companies.
For further explanation and a full list of the classifications, refer to the FILE.CONTROL help text.
All new applications should define a set of reserved fields that can be used to add extra fields to the
application without the need to change the layout of the data:
Z+=1 ; F(Z) = "RESERVED.10" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.9" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.8" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.7" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.6" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.5" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.4" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.3" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.2" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.1" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
All applications MUST contain a LOCAL.REF field. This allows T24 clients to add user definable fields to
the application. The settings should look like this:
Z+=1 ; F(Z) = "XX.LOCAL.REF" ; N(Z) = "35" ; T(Z) = "A"
All applications MUST have a field to store overrides. Even if your application does not currently use the
override processing (refer to the “Adding Business Logic” section), it is probable that it will in the future.
Z+=1 ; F(Z) = "XX.OVERRIDE" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Applications that raise accounting entries MUST define a field to hold the entry ids that have been raised.
This MUST be the last field that you define.
Z+=1 ; F(Z) = "XX.STMT.NOS" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
The variable V is an important common variable used to hold the number of fields in the record and
should be set to Z + 9 for input applications and Z for display only applications (where Z is the last field
defined in the 'F' array).
Examples:
'10' Up to 10 characters allowed, no special editing will be done. Optional.
'10.1' Between 1 and 10 characters allowed, no special editing will be done.
'006.6.C' Input must be 6 characters. Leading zeros will not be removed and the field will be
subject to processing by the CHECK.FIELDS routine.
‘35..C' Up to 35 characters of input will be accepted, leading spaces, trailing spaces and
duplicated embedded spaces will be removed. For example, the keyed input 'LLOYDS
BANK PLC' will be edited to 'LLOYDS BANK PLC.' Null will be accepted and the
input will be subject to FIELD.CHECKS.
Type Routine
Account Number IN2ACC,IN2.ACCD,IN2ALL,IN2ANT,IN2INT
Alphabetic IN2AAA,IN2SSS
Alphanumeric IN2A,IN2AA,IN2S,IN2SS
Any character IN2ANY
Amount IN2AMT
Company Code IN2COM
Currency Code IN2CCY,IN2.CCYD
Customer Number IN2CUS
Date IN2D,IN2.ACCD,IN2.CCYD,IN2.D,IN2YM,IN2.YM,IN2FQU
Frequency IN2FQU
Mnemonic IN2MME
Numeric IN2, IN2R
Program Name IN2PG,IN2PV
Range IN2
Rate IN2R
Security IN2SEC
Specific Values IN2
Swift Characters IN2S,IN2SS,IN2SSS
Version IN2PV
Field 3
Defines input restrictions and can be any of the following values:
Value Description
Null Input will be accepted in all circumstances (subject to editing and security restrictions
etc.).
NOINPUT Input will never be allowed
NOCHANGE Input will not be allowed once the record has been authorised
EXTERN Input will never be allowed and the field will be cleared by the copy function
Field 4
This field is used to define a mask for input and display editing. The format of the mask is generally as
used by the BASIC function FMT. A special mask is used by routines that edit dates (see the section
describing these particular IN2 routines).
Field 5
Defines the display justification, Null = Left justified, R = Right justified.
Field 7
Fields to be deleted when containing default figures after input of this field VM = Field marker
when more than one field defined
Field 8
Defines restrictions on multivalue fields. If used, the settings should be specified for the first field in the
association and may be set to the following values:
• 'NOMODIFY' - No changes allowed to association
• 'NODELETE' - No deletion allowed to association
• 'NOEXPAND' - No expansion allowed to association
Field 9
'Hot Field' properties for browser:
• 'HOT.FIELD' – Check field validation will be performed on this field
• 'HOT.VALIDATE' – Check field validation will be performed on ALL fields (equiv. to pressing
browser 'Validate' button)
VIRTUAL.TABLE.LIST = ''
VIRTUAL.TABLE.LIST = 'VIRTUAL.TABLE'
CALL EB.LOOKUP.LIST(VIRTUAL.TABLE.LIST)
The variable VIRTUAL.TABLE.LIST can then be used to directly populate the T array directly:
T(Z) = VIRTUAL.TABLE.LIST ; * List from EB.LOOKUP
The actual items for the virtual table are defined on one table, called EB.LOOKUP. The key to this
table is VIRTUAL.TABLE.NAME*REAL.KEY, e.g. EB.STATUS*COMPLETE.
The list populates the second field of the T array, such that a list of the available options is available to
the user without need to use a dropdown. EB.LOOKUP contains additional fields in a name – value
pair structure that may be used to contain parameter information. Refer to the help text on
EB.LOOKUP for more information.
2.3.7 Operations
Provision has been added to allow OPERATION style fields to be defined. The concept is that a
trigger field is used to determine the action that is being performed, and depending upon that action
certain fields in the application will be made available for input while others will become no input. This
concept has existed in T24 applications for some time (e.g. in the LC and PD modules) and now
support has been added to the template.
Firstly, a field must be defined that holds the options, and should be named OPERATION
Z+=1 ; F(Z) = "OPERATION" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<2> = 'ACCEPT_REJECT'
The property P_TRIGGER is used to store which field will act as the trigger for the operation process,
and should be set to the equated field name:
C_PROPERTIES<P_TRIGGER> = MY.APP.OPERATION
There are two further properties that are used to control which fields will be made available for input,
and which fields will be set to no input. Each property takes a value mark (VM) delimited list of fields.
ACCEPT.FIELDS.NOINPUT = MY.APP.REJECT.DATE : VM : MY.APP.REJECT.REASON
REJECT.FIELDS.INPUT = MY.APP.REJECT.DATE : VM : MY.APP.REJECT.REASON
ACCEPT.POS = 1
REJECT.POS = 2
C_INPUTS<REJECT.POS> = REJECT.FIELDS.INPUT
C_NOINPUTS<ACCEPT.POS> = ACCEPT.FIELDS.NOINPUT
In the above example, the fields REJECT.DATE and REJECT.REASON will be no input when the
ACCEPT operation is selected – all other fields will behave as defined in the T array. When the
REJECT operation is selected, only the REJECT.DATE and REJECT.REASON fields will be available
for input – all others will no input. If both properties are set for an operation, the C_NOINPUTS
property is ignored. NB If we are processing a NOINPUTS list, then any field that is already defined as
NOINPUT, NOCHANGE, etc. will retain that definition to prevent reserved fields, etc. being made
inputtable!
ACCEPT.POS and REJECT.POS refer to positions in the list of allowed operations (T(Z)<2>).
Example
To encourage re-use, check file definitions for tables should be defined in the initialise section of
the .FIELDS and then referenced later.
CHK.ACCOUNT = "ACCOUNT": FM : AC.SHORT.TITLE: FM :"L"
CHECKFILE(Z) = CHK.ACCOUNT
Z=0
*A standard numeric field
Z+=1 ; F(Z) = "NUMERIC" ; N(Z) = "35" ; T(Z) = ""
* A text box
Z+=1 ; F(Z) = "XX.TEXT" ; N(Z) = "35" ; T(Z) = "A" ; T(Z)<7> = 'TEXT'
; * Limited options
Z+=1 ; F(Z) = "LIST" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<2> = 'OPTION1_OPTION2_OPTION3'
* CUSTOMER field
Z+=1 ; F(Z) = "CUSTOMER" ; N(Z) = "35" ; T(Z) = "CUS" ; CHECKFILE(Z) = CHK.CUSTOMER
* Account field
Z+=1 ; F(Z) = "ACCOUNT" ; N(Z) = "35" ; T(Z) = "ACC" ; CHECKFILE(Z) = CHK.ACCOUNT
* Currency field
Z+=1 ; F(Z) = "CURRENCY" ; N(Z) = "35" ; T(Z) = "CCY" ; CHECKFILE(Z) = CHK.CURRENCY
* Category field
Z+=1 ; F(Z) = "CATEGORY" ; N(Z) = "35" ; T(Z) = "" ; CHECKFILE(Z) = CHK.CATEGORY
* Delivery Ref field
Z+=1 ; F(Z) = "XX.DELIVERY.REF" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
*-----------------------------------------------------------------------------
* Example block of reserved fields
*-----------------------------------------------------------------------------
Z+=1 ; F(Z) = "RESERVED.10" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
Z+=1 ; F(Z) = "RESERVED.1" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
*-----------------------------------------------------------------------------
* Add an OVERRIDE and LOCAL.REF field
*-----------------------------------------------------------------------------
Z+=1 ; F(Z) = "XX.LOCAL.REF" ; N(Z) = "35" ; T(Z) = "A"
Z+=1 ; F(Z) = "XX.OVERRIDE" ; N(Z) = "35" ; T(Z) = "" ; T(Z)<3> = 'NOINPUT'
*-----------------------------------------------------------------------------
* TODO Remove STMT.NOS field if no accounting is done
*-----------------------------------------------------------------------------
Z+=1 ; F(Z) = "XX.STMT.NOS" ; N(Z) = "35" ; T(Z) = ""
V = Z + 9
has performed successfully. Typical use of this section would be to make related updates to other files,
call accounting, etc.
EQU dasExampleInterestSchedules TO 1
EQU dasExampleTodaysSchedules TO 2
EQU dasExampleDealsOfAType TO 3
EQU dasExampleCustomerCurrency TO 4
COMMON/DAS.EB.LOOKUP/DAS$CACHE(100),DAS$NOTES(100)
*-----------------------------------------------------------------------------
DAS$NOTES(dasExampleInterestSchedules) = 'All interest Schedules'
DAS$NOTES(dasExampleTodaysSchedules) = 'All schedules with today’s date'
DAS$NOTES(dasExampleDealsOfAType) = 'All deals with the supplied DEAL.TYPE'
DAS$NOTES(dasExampleCustomerCurrency) = 'Deal that have the supplied customer AND
supplied currency'
Simple queries define the fields, operands and the data to query. The data may be literals:
CASE MY.CMD = dasExampleInterestSchedule ;* All interest schedules
MY.FIELDS = 'SCHEDULE.TYPE'
MY.OPERANDS = 'EQ'
MY.DATA = 'INTEREST'
Common variables:
More complex queries are defined by adding fields to the arrays, and specifying the MY.JOINS array:
MY.OPTIONAL.FIELDS<n> = dasIsAnOptionalField
2. Signalling to the DAS architecture that the optional field is not required in this instance.
When an optional field is to be omitted from the select statement in a given instance the routine
which calls DAS should use the I_DAS.STANDARD insert and then set the data in the appropriate
position in the THE.ARGS array to dasDoNotUseThisOptionalField before calling DAS, thus:
THE.ARGS<n> = dasDoNotUseThisOptionalField
Otherwise THE.ARGS should be populated with the data that the field is to be compared with.
3. Using the information from 1 & 2 inline to either omit or include the field from the select statement
and to indicate that a field is optional when in DISPLAY mode.
EB.QUERY.BUILDER will not add the selection criteria for a field that where
MY.OPTIONAL.FIELDS<n> EQ dasIsAnOptionalField AND THE.ARGS<n> EQ
dasDoNotUseThisOptionalField
When called in DISPLAY mode, arguments are usually quoted thus "ARG1" when a field is
defined as optional the arguments will be displayed quoted with tildes thus ~ARG1~.
MY.OPERANDS<1> = ‘EQ’
MY.DATA<1> = THE.ARGS<1>
MY.JOINS<1> = ‘AND’
MY.FIELDS<2> = ‘START.RANGE’
MY.OPERANDS<2> = ‘EQ’
MY.DATA<2> = THE.ARGS<2>
EB.QUERY.BUILDER will recognise the multi-values in THE.ARGS<1> as multiple valid field values
for the CONSOL.FIELD field and build a statement similar to the one above. This removes the need
for the repetition of the CONSOL.FIELD field and the brackets.
Deals that have the supplied customer AND the supplied currency
SELECT F.EXAMPLE WITH CUSTOMER EQ ARG1 AND CURRENCY EQ ARG2
...
$INSERT I_DAS.COMMON
$INSERT I_DAS.ACCOUNT
...
THE.LIST = dasAccountGroupCcyById
THE.ARGS = CURRENCY
dasMode = dasReturnQuery
...
$INSERT I_DAS.COMMON
$INSERT I_DAS.COMPANY
...
THE.LIST = dasAllIds
THE.ARGS = ''
dasMode = dasReturnDescription
CALL DAS('COMPANY', THE.LIST, THE.ARGS, '')
CRT THE.LIST<1> ; * The query
CRT THE.LIST<2> ; * The description
Value Meaning
ALL Full Non Stop operation providing NS module is installed
NEW new deals allowed in NS mode only providing NS module is installed
NOD Non stop input allowed with NS module (for apps like PGM.FILE, BATCH etc)
no NS operation allowed
If the application does not allow NS there is no need to specify it as null. This allows local
developments to be non-stop if required.
3 The Infrastructure
3.1 Introduction
The T24 infrastructure provides many features so that the developer does not need to write or even
consider these items. This section gives an overview of these features.
The application program requires no special code to achieve this functionality. See the Security
Management System Administration Guide for more details.
3.5 Validation
Input validation can be specified with the field definitions and hence the infrastructure will check the data
entered. The validation available is comprehensive, offering simple checks such as numeric/non-numeric
input, to complicated date and amount edit checks. Input can also be verified against an existing table as
well as being passed to an application specific routine.
To allow maximum flexibility, the infrastructure can pass control back to the application for further
validation at any stage. The template also contains sections for further validation on completion of input
(cross-validation), authorisation, deletion etc.
4 Appendices
4.1 Appendix 1 - Glossary
Term Description
Product Group Defines areas of business functionality, e.g. Retail, Treasury, etc.
Product A specific piece of business functionality within a product group, e.g.
Funds Transfer, Foreign Exchange. Product Groups are made of
multiple Products
Module Same a product
Application A program or subroutine that allows data entry into a T24 file, e.g.
CUSTOMER, FOREX etc. Products will consist of many applications.
Subroutine A routine invoked by an application program or close of business
process, i.e. not directly executable by the user.
Infrastructure The main supporting sub-system for an application. It manages screen
input, security (SMS), file updates etc.
Live file The file which holds authorised data.
Unauthorised file The file which holds unauthorised data.
History file The file which contains copies of previously authorised data.
Concat file A file which is used as an alternate index to a live file.
DAS Data Access Service… a service which documents and performs all of
the online enquiries on an application/table.
4.2.2 PGM.FILE
PGM.FILE acts as the registry for applications and programs in T24. Refer to the helptext for more
information.
4.2.3 STANDARD.SELECTION
STANDARD.SELECTION is the dictionary application for T24 and each application must have an
entry in STANDARD.SELECTION so that the T24 framework will function correctly.
The STANDARD.SELECTION record can be built from the underlying code by setting the field
REBUILD.SYS.FIELDS to Y and committing the record.
4.2.4 EB.SYSTEM.ID
EB.SYSTEM.ID is used to provide a description of the SYSTEM.ID field in the accounting entry files,
STMT.ENTRY, CATEG.ENTRY, CONSOL.NET.TODAY and RE.CONSOL.SPEC.ENTRY.
The application also holds additional details of the underlying application record which was
responsible for raising the entries and is used to allow the correct drill-down in entry based enquiries.
Items with a solid blue lozenge are available for programmers to add there own code.
4.3.2 MATRIX.UPDATE
Sets up the internal tables and variables from the parameters assigned in the .FIELDS routine
4.3.3 RECORDID.INPUT
This routine handles the input of the FUNCTION to be performed (input, authorise, list etc.) and the
input of the record key. It sets MESSAGE to 'RET' if the application is to be exited or to 'NEW
FUNCTION' if the FUNCTION has been initially input or changed.
4.3.6 RECORD.READ
This subroutine reads the records from the files into one or more of R.NEW, R.NEW.LAST and R.OLD,
depending on the function being used.
Where the function is I or A, if an unauthorised record exists it will be assigned to R.NEW and
R.NEW.LAST, otherwise the live record will be assigned to R.NEW and R.NEW.LAST, unless it is also
not present, in which case the arrays will be initialised to nulls. R.OLD will be assigned with the live
record if it exists, otherwise with nulls.
Where the function is ‘C’, if an unauthorised record exists it will be assigned to R.NEW otherwise
R.NEW will be assigned from the live record. R.NEW.LAST and R.OLD will be set to nulls.
If the function requires a record to be present and it is not found MESSAGE will be set to 'REPEAT'.
4.3.7 MATRIX.ALTER
This subroutine does further initialising of the internal parameters dependant on the size and
infrastructure of the record, which has been read.
4.3.12 UNAUTH.RECORD.WRITE
This system routine writes the input or changed record to the unauthorised ($NAU) file.
4.3.13 AUTH.RECORD.WRITE
This system routine writes the input or changed record to the live file.
4.4.2 Template V 1
The original template identified different sections and broke these out into labels, though these were
accessed in a drop down manner. Most code for an application was in a single subroutine. Each new
application is a copy of a template.
4.4.3 Template V 2
The structure changes such that subroutines are used and the flow is controlled using GOSUB
statements rather than GOTOs, leading to a much easier to understand template. Each new
application copies the template code, and the template code itself may be modified. Most code for an
application is still in a single subroutine which leads to some very large and complex programs.
Conflicts happen when multiple people need to work on a single piece of code.
4.4.4 Template V 3
Very similar to the second version, but here each extension point was written as a separate routine
and templates were issued against these. The XX.CROSSVAL template automatically repeated check
fields at the cross validation step.