DEV1.T24 Template Programming-R10
DEV1.T24 Template Programming-R10
Slide 2
Objectives
Adequate knowledge to
Write code to raise accounting entries, overrides, errors, validations
Create Multi threaded subroutines
Slide 3
Day wise Agenda
Day 1
An introduction to TEMPLATE programming
Understanding the TEMPLATE subroutine
Day 2
Understanding [Link] flow
Day 3
Discuss the DEBIT CARD example
Creating Fields in an Application
Day 4
Creating required applications
Slide 4
Day wise Agenda
Day 5
Validations and Workshops
Day 6
Overrides & DAS
Workshops
Day 7
Multithreading
M ltith di
Running as COB and Service
Workshop
Slide 5
Day wise Agenda
Day 8 & 9
Accounting
Workshop
Writing better code workshop
D 10
Day 10, 11 & 12
Extra Information
Templates in R5
Workshop
Comparison between R5, R7 and R9 templates
Slide 6
Day 1
Day 1
An introduction to TEMPLATE programming
Understanding g the TEMPLATE subroutine
Slide 7
g1
What Is An Application In T24?
n1
T24 Applications
Allows input of data
Stores data in database
Performs a business functionality
Example: Funds Transfer, Money Market
T24 Tables
Allows input of data
Stores data in database
Holds static data used by other applications
Performs no business functionality on its own
Example:
p Category,
g y Currency y
Slide 8
Slide 8
n1 Read the document for Template Programming in R10 for a detailed understanding of the course
nausheen, 2/17/2010
g1 Since this is elearning course instead of giving numbers 1 & 2 in the notes page please mention that explanantion for no. 1 is for What
is an application. and explanation for no. 2 is for What is a Table.
Follow the same for What is a Table? Since no. 2 has started directly with it is similar to applications will lead to confusion for
elearning team. Explain each point in brief for T24 Tables and give examples of Tables in T24
gshital, 4/5/2010
g2
Applications in T24
Slide 9
Slide 9
g2 Since L T & W type application contains only live file explain the difference among these 3 types with example.
gshital, 4/5/2010
Functions in T24
There are different functions that can be used with these applications
I Input
A Authorise
S See
L List
V Verify
C Copy
D Delete
R Reverse
H History Restore
2 Second Authoriser
P Print
Q Audit
Slide 10
Application Classification
Other classifications
Oth l ifi ti available
il bl ttoo, b
butt h
have properties
ti off one off th
the
above
CUS – F<MNE>.<APPLICATION>{$<SUFFIX}
INT – F. <APPLICATION>{$<SUFFIX}
Slide 11
Definitions from T24
What is a Product?
One or more applications and tables that work together to perform a
business functionality
Slide 12
Before Creating An Application
W mustt decide
We d id a name ffor our application
li ti
W mustt decide
We d id what
h t ffunctions
ti are going
i tto be
b permitted
itt d
Slide 13
s2
g3
Application flow in T24 – Always the same
1. Enter Application
pp Name
When we enter data and hit the edit button, the function is taken as I and the
data is validated as an ID of the application
3. Open record
Checks if record exists with same ID, if yes read from file and load into cache
Slide 14
Slide 14
s2 When explaining this slide you must demo to them so that they will actually accept this flow. First you can launch an invalid
application, and then you can use a correct application name but with an invalid function etc. If your batch of trainees is not freshers,
then you can ask them to try this out instead of a demo by you. This too is a really important slide and a demo by you will make the
‘flow of an application’ in T24 crystal clear.
sara, 4/28/2009
g3 Instead of using 'we' in the notes page make usage of 'you' or 'user' explain each step in the flow in brief not all steps are explained
here in the notes page
gshital, 4/5/2010
s5
g12
Application flow in T24 – Always the same
5. Authorise Record
S d advices
Send d i t
to customer
t (if any)
)
Slide 15
Slide 15
s5 When explaining this slide you must demo to them so that they will actually accept this flow. First you can launch an invalid
application, and then you can use a correct application name but with an invalid function etc. If your batch of trainees is not freshers,
then you can ask them to try this out instead of a demo by you. This too is a really important slide and a demo by you will make the
‘flow of an application’ in T24 crystal clear.
sara, 4/28/2009
g12 Instead of using 'we' in the notes page make usage of 'you' or 'user' explain each step in the flow in brief not all steps are explained
here in the notes page
gshital, 4/5/2010
g4
We have decided
Business Functionality
When and What we must do
Other Features
-Functions
F ti My new
-Product Information Application
-Type of Application H, U. L etc.,
-Classification FIN, CUS, INT etc.,
Slide 16
Slide 16
Explain each box in brief that to create an application these many steps required to take.
gshital, 4/5/2010
Code…
Slide 17
What now…
Business Functionality
When and What we must do
METHODS
Other Features
-Functions
F ti My new
-Product Information Application
-Type of Application H, U. L etc.,
-Classification FIN, CUS, INT etc.,
Properties defined in TEMPLATE
Slide 18
s3
Common Variables
Variables in T24
Global
Local
$
$INSERT I_File - will look for I_ file in current directory,
y, [Link] and
[Link]
Slide 19
Slide 19
s3 Many trainees are confused with the contents of COMMON insert files and Application insert files. Clear the air at this point in time.
This is because the INSERT statment is used for both
sara, 4/28/2009
A Must Know
[Link]
[Link]
[Link]
[Link]()
[Link]()
[Link]()
Slide 20
What Happens When A New Record Is Created In T24?
Slide 21
[Link]
Slide 22
[Link]
[Link] holds the ID of the currently opened record, while [Link] holds the
actual record. ‘R’ in the variable name stands for ‘Record’
Inference : Since the size of [Link] is now restricted to 500 it implies that
no application in T24 has more than 500 fields. The day it exceeds 500,
C$SYSDIM’s value will be increased
Slide 23
When Happens When A Record Is Authorized?
Values from [Link] only are written into the database when record is COMMITTED/AUTHORISED
Slide 24
[Link]
You may ask, ‘Will the ID of a live record and a unauthorized record
ever be different?”
No. This variable enables us to know, programmatically whether an
unuathorised record exists for the currently opened record
Slide 25
[Link]
Slide 26
What Happens When An Authorized Record Is Amended?
Values from [Link] only are written into the database when record is COMMITTED/AUTHORISED
Slide 27
[Link]
Slide 28
[Link]
Slide 29
g5
What Happens When A Change On An Authorized Record Is Authorized?
The
The old authorized record (With Sector 1100) goes to history ([Link]$HIS)
Contents
C t t off [Link]
R NEW is
i written
itt tot the
th LIVE file
fil
Slide 30
Slide 30
g5 Please mention that this record is opened for authorisation that's why [Link] and [Link] hold the same copy in this case record
is committed and opened for authorization
Mention both cases in the notes page the explanation given in the notes page is not enough [Link] is not at all explained in the
notes page
gshital, 4/6/2010
Common Variables – I_COMMON
AF, AV, AS – Holds the field position, multi value position and sub
value position respectively
Slide 31
Some more Common Variables
[Link] - Loaded as soon as the user logs in, holds the USER profile
LCCY, LNGG
Holds Local Currency as defined in company
Holds the language from the USER profile
Slide 32
The TEMPLATE Subroutine
Slide 33
Other Component of an Application
s19
What does T24 do with all the properties of the application we define in
the TEMPLATE subroutine?
[Link] Entry
Type of application
Special properties (additional info)
[Link] Entry
File suffixes available
Classification
Slide 34
Slide 34
s19 Do not discuss how to create these right now, but discuss the use of each
salamelu, 2/20/2009
Other Component of an Application
s21
[Link] Entry
Actual field names
Field properties
Slide 35
Slide 35
s21 Do not discuss how to create these right now, but discuss the use of each
salamelu, 2/20/2009
Other Component of an Application
s48
Slide 36
Slide 36
s48 Do not discuss how to create these right now, but discuss the use of each
salamelu, 2/20/2009
Other Component of an Application
s49
Slide 37
Slide 37
s49 Do not discuss how to create these right now, but discuss the use of each
salamelu, 2/20/2009
Getting Started
Each application that we create, must have its own copy of the
TEMPLATE
Slide 38
g6
Table Objects
Slide 39
Slide 39
g6 Need to specify from where this screen shot has been taken. In this case it is taken from TEMPLATE
please mention that
gshital, 4/5/2010
g7
How are the properties used?
Slide 40
Slide 40
g7 Mention that from the given list we can see that T24 gets information for the additional components of an application from the
information provided in TEMPLATE subroutine..
gshital, 4/5/2010
I_Table
s43
COMMON/[Link]/[Link](C$SYSDIM),[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
bl fi
[Link],
[Link],
[Link],
[Link],
Table lastApplication
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
Slide 41
Slide 41
s43 Open I_Table and show the various common variables in that insert file, to get the trainees familiar about them
salamelu, 2/22/2010
How is TEMPLATE and [Link] related?
s22
Slide 42
Slide 42
s22 Tell trainees to read the word document also, many points are left out on the slide
salamelu, 2/20/2009
[Link]
SUBROUTINE [Link]([Link])
.
.
.
[Link] = ''
CALL @[Link]
IF Table
[Link]
name THEN
CALL [Link] ;* We need to call the central template routine
END ELSE
[Link] = "" ;* We've called a non central template
END
.
.
.
.
.
Slide 43
[Link] Subroutine
s6
Slide 44
Slide 44
s6 Explain about the flow in [Link] in general terms, before going into the actual methods. Refer the document.
salamelu, 2/20/2009
Methods in Template Programming
s7
M t follow
Must f ll naming
i convention
ti [Link]
APPNAME METHODNAME
Slide 45
Slide 45
s7 Though [Link] does not enforce any method as mandatory, Every application must have atleast one field, hence defining
.FIELDS method is essential.
salamelu, 2/20/2009
Methods
Slide 46
I_METHODS.[Link]
Slide 47
I_METHODS.[Link]
Slide 48
Methods in Template Programming
s23
INITIALISE
FIELDS
FUNCTION
ID
RECORD
VALIDATE
PREVIEW
OVERRIDES
PROCESS
AUTHORISE
RUN
Slide 49
Slide 49
s23 Dont discuss each method in detail now.. Ask the class what they think will be part of the methods
salamelu, 2/20/2009
Day 2
Understanding [Link] flow
Slide 50
[Link]
Slide 51
Behind the Scenes – [Link]
s9
Initialise
The first method to be executed when an application is launched
Fields
The next method to be executed
Function
This is executed after a function is entered by the user. If no function is
entered the default is Input
entered, Input.
ID
Executed after the function entered is validated. Validated ID, can modify ID
if required
Slide 52
Slide 52
s9 Explain what methods will get called at what stage of exection. When you click on validate, all methods from .DEFAULT to .PROCESS
gets executed. Again when you click on commit button, all these methods get executed. Clicking on validate button, gives an overall
picture of what happens when the record gets committed, except that it does not call [Link].
salamelu, 2/20/2009
Behind the Scenes – [Link]
Record
Executed before the record requested (existing or new) is displayed to the
user
Validate
After values are defaulted (if any) all data is validated
Preview
After data is validated, a delivery preview is available
Overrides
Overrides if any are generated now
Slide 53
Behind the Scenes – [Link]
Process
If all overrides are accepted, then this method is called before the record is
written to the $NAU file
Validate
All data is validated twice,
twice once during commit and once during authorise
Authorise
This is executed after the Authorise button is clicked
Slide 54
Using the Template Methods – Common Variables Available
s24
INITIALISE
Anything that needs to be done as soon as an application is launched can
be done here. It is not a mandatory method
FIELDS
This is the method in which an applications fields are defined. This is a
mandatory method as an application must have at least one field
FUNCTION
Code that need to be executed depending on the function entered,
manipulation of the function itself can be done here (V$FUNCTION)
Slide 55
Slide 55
s24 Disucss the use of the methods in detail and also make sure you mention from which method onwards, what common variables are
available for manipulation....
salamelu, 2/20/2009
Using the Template Methods – Common Variables Available
s50
ID
Special editing to the ID entered, special validations to the ID ([Link])
Slide 56
Slide 56
s50 Disucss the use of the methods in detail and also make sure you mention from which method onwards, what common variables are
available for manipulation....
salamelu, 2/20/2009
Using the Template Methods – Common Variables Available
s51
RECORD
Editing of the requested record before display to the user ([Link],
[Link],[Link])
Slide 57
Slide 57
s51 Disucss the use of the methods in detail and also make sure you mention from which method onwards, what common variables are
available for manipulation....
salamelu, 2/20/2009
Using the Template Methods
VALIDATE
Special validation of data
[Link], [Link], [Link], E, Subroutine ERR
OVERRIDES
Overrides if any, must be raised here
[Link], [Link], [Link], ETEXT, Subroutine [Link]
Slide 58
Using the Template Methods
PROCESS
Processing that has to be done before the record is written to the $NAU file
Limits
Accounting
Charges
Slide 59
Using the Template Methods
AUTHORISE
Processing to be done before record is written into LIVE file
Accounting
Delivery
Updating associated applications
RUN
This method is called only for W type applications that use the Verify
function
Slide 60
What Can Applications In T24 Do?
The ability
abilit to add / remo
remove
e fields
Slide 61
Digging Deep - [Link]
Slide 62
Digging Deep - [Link]
This calls
Thi ll a subroutine
b ti with ith th
the application
li ti name – nothing
thi b butt th
the
subroutine which a copy of TEMPLATE
Slide 63
Digging Deep - [Link]
With any input, if we click the Edit button, it validates the data against
the ID of the application – ID method
Slide 64
Digging Deep - [Link]
[Link] and [Link] are two core routines that take care
of displaying the application screen
Slide 65
Digging Deep - [Link]
Click
Cli kCCommit
it or V
Validate
lid t andd th
then…
Can move on only after correcting errors
VALIDATE method
Slide 66
s42
Digging Deep - [Link]
Can view
C i preview
i off d
delivery
li message after
ft validation
lid ti
.PREVIEW has to be set in ‘Additional Info’ field in [Link]
PREVIEW method
P i
Preview generated
t d using
i core routine,
ti EB
[Link]
HANDOFF
Slide 67
Slide 67
s42 Make the trainees input an FT. After validation, view the' delievery outref' and 'delivery inref' id's updated in the FT record. Click the
preview icon. Note the delivery preview pop up window.
Note: Ensure 'Dr Advice Reqd' and 'Cr Advice Reqd' fields in [Link] is set to 'Y'.
For any application to generate preview of delivery advices, supporting code has to be provided in .PREVIEW method.
salamelu, 2/12/2010
Digging Deep - [Link]
Overrides
O id come nextt
No option to reject overrides, just change data and Commit again
OVERRIDES method
Slide 68
Digging Deep - [Link]
Slide 69
Digging Deep - [Link]
VALIDATE method
AUTHORISE method
Slide 70
JOURNAL ???
[Link]
[Link] at any given time will only hold the last 20 transactions per user
F WRITE writes
[Link] it tot cache
h
FWC, FWT, FWF
Note: [Link] will hold the transaction details only if the field [Link] in SPF is
set to YES.
Slide 71
Day 3 & 4
Discuss the DEBIT CARD example
Creating
g Fields in an Application
pp
Creating required applications
Slide 72
DEBIT CARD EXAMPLE
Slide 73
Debit Card Example
We must make sure to create a directory to keep the code that we are
going to write
Slide 74
Debit Card Example
s25
Slide 75
Slide 75
Discuss that the 2 variables shown are dynamic variables and they are discussed on the next slide
salamelu, 2/20/2009
What we want to achieve…
s10
Slide 76
Slide 76
s10 Ask trainees to go through the functional and technical spec for Debit Card and make sure they are clear about the requirements.
salamelu, 2/20/2009
What we want to achieve…
Slide 77
Defining Fields
Slide 78
F Array
Normal Field
F(Field position) = ‘FIELDNAME1’
Slide 79
F Array
Slide 80
F Array
ID.F = ‘[Link]’
Slide 81
N Array
'006.6' Input must be 6 characters. Leading zeros will not be removed and the field
data will be validated at commit time.
Slide 82
ID.N
ID.N = ‘16’
Slide 83
T Array
s26
Slide 84
Slide 84
s26 For each sub field in the T array, we must give examples of use from existing applications. Please refer Template Programming
document
salamelu, 2/20/2009
T Array
T(FieldPosition)<3> - NOINPUT/NOCHANGE/EXTERN
NOINPUT – Field never available for input
NOCHANGE – Field not inputtable after record is authorised
EXTERN – Field is cleared if record is copied
Slide 85
T Array
T(FieldPosition)<5> - Justification
Default
D f lt Left
L ft justified,
j tifi d no need
d to
t specify
if T(FieldPosition)<5>
T(Fi ldP iti )<5>
Right justified (R) and center justified (C ) are the other 2 options
Slide 86
T Array
s27
T(FieldPosition)<8> - NOMODIFY/NODELETE/NOEXPAND
No Modification or changes allowed to multi value set after first
authorisation
Multi value set cannot be deleted after record is authorised
Multi value set cannot be expanded further after authorisation
T(FieldPosition)<9> - [Link]/[Link]/[Link]
[Link] causes field to be validated immediately
[Link] causes all fields to be validated
[Link] triggers validation at web server level
Slide 87
Slide 87
s27 Mention that the T(Z)<8> is used for multi value sets and that T(Z)<3> is for a single value field
salamelu, 2/20/2009
Built-in Data Types
Slide 88
I_Datatypes
COMMON/DataTypeCommon/[Link],
[Link],
[Link],
[Link]
Slide 89
[Link]
s11
IF NOT([Link]) THEN
CALL [Link]
END
Slide 90
Slide 90
s11 Explain why the values populated for the datatypes by this subroutine, are session specific
salamelu, 2/20/2009
[Link]
SUBROUTINE [Link]
id = "[Link]"
length = 35
type = "A"
file = ''
GOSUB addBasicType
addBasicType:
typePos +=1
[Link]<typePos> = id
[Link]<typePos> = length
[Link]<typePos> = LOWER(type)
[Link]<typePos> = file
RETURN
Slide 91
Field Definitions
Field Definitions
Slide 92
Defining Fields – API’s
s4
Slide 93
Slide 93
s4 Go through the word document for a detailed explanation of the API's. Use the examples provided in the word document to explain the
use of the API's to the trainees.
salamelu, 2/12/2009
g8
[Link]
[Link](idName, dataType)
It takes 2 parameters,
parameters the id name (ID
(ID.F
F item) and the data type of the
key
Slide 94
Slide 94
g8 Notes page doesn't look in e-lerning format it should be more descriptive not the just the copy of slide points
gshital, 4/6/2010
s46
g9
[Link]
[Link](idName, dataType)
SUBROUTINE [Link]
dataType = ''
dataType<2> = 16.1
dataType<3> = ''
CALL [Link]("[Link]",dataType)
Slide 95
Slide 95
g9 gshital 06/04/2010
Notes page doesn't look in e-lerning format it should be more descriptive not the just the copy of slide points
gshital, 4/6/2010
s44
[Link]
CALL [Link]("[Link]",T24_String,‘‘,‘‘)
Slide 96
Slide 96
s44 This API is used for creating fields with teh standard data type specifications
salamelu, 2/22/2010
s45
[Link]
s47
CALL [Link]("[Link]",35,‘A‘,‘‘)
Slide 97
Slide 97
s45 This API is used when we want to specify our own values for N and T arrays, instead of using the standard data types.
salamelu, 2/22/2010
s47 The trainer could ask the trainees to start creating the debit card application at this point after explaining the basic API's to create the
id and fields. This will help becoming familiar with teh use of these API's rather than explainign all the API's and then starting the
template creation.
salamelu, 2/22/2010
[Link]
s41
It takes 3 parameters,
parameters where
where,
• args – the list of arguments passed to [Link].
• nArrayItem - The N array item to process
• tArrayItem - The T array item to process
Slide 98
Slide 98
ARGS = Field_Mandatory:",":Field_AllowNegative
CALL [Link]("[Link]",T24_Numeric,ARGS,'')
salamelu, 3/6/2009
[Link]
Slide 99
[Link]
T24 allows us to hard code drop down options for a field in the T array
Slide 100
[Link]
Slide 101
[Link]
[Link](fieldName,
( tableName, args,
g neighbour)
g )
Slide 102
[Link]
CALL [Link]("[Link]",T24_Date,Field_NoInput,'')
CALL [Link](TODAY) ;* Assign default value
Slide 103
CHECKFILES
Slide 104
[Link]
s39
CALL [Link]("CUSTOMER",T24_Customer,Field_Mandatory,'')
CALL [Link]("CUSTOMER")
For the
F th field
fi ld C
Customer,
t whatever
h t iis entered
t d iin validated
lid t d against
i t th
the
CUSTOMER application.
Slide 105
Slide 105
s39 No specific API for defining checkfile for ID. WE have to use [Link]
salamelu, 3/3/2009
[Link]
s52
CALL [Link]("CUSTOMER",T24_Customer,Field_Mandatory,'')
CALL [Link]("CUSTOMER")
Slide 106
Slide 106
s52 No specific API for defining checkfile for ID. WE have to use [Link]
salamelu, 3/3/2009
[Link]
Slide 107
[Link]
CALL [Link]("[Link]","S_W",'','')
Slide 108
[Link]
Slide 109
[Link]
[Link](attribute, fieldList)
Loops th
L throughh eachh fifield
ld iin fifieldList
ldLi t and
d sets
t th
the atribute
t ib t iin th
the thi
third
d
field of the T array. Loops through each field in fieldList and sets the
atribute in the third field of the T array
Slide 110
[Link]
s37
All new applications must 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
Slide 111
Slide 111
s37 When new fields sre added to an existing application, we must release a convertion routine to realign the existing values. But if we add
that new field on to the reserved field, we can prevent this realigning. That is the main purpose of reserved fields.
salamelu, 2/27/2009
[Link]
Applications that raise delivery events must define a field to hold the
delivery references
CALL [Link](neighbour)
Slide 112
[Link]
Local reference fields allows T24 clients to add user definable fields to
the application.
CALL [Link](neighbour)
Slide 113
[Link]
Applications that raise accounting entries must define a field to hold the
entry ids that have been raised
CALL [Link](neighbour)
Slide 114
[Link]
CALL [Link]
Table addOverrideField
Slide 115
[Link]
Sets the position of the audit fields when defining the field definition for
a table.
Slide 116
Audit Fields
Slide 117
Audit Fields
Note: The order of definition of fields must be such that the overrides field is just before the
audit fields and the [Link] field must precede the overrides field.
Slide 118
CONCAT Files
Example - [Link]
When CONCAT file is specified for a field in the application, data from
field is ID to record in CONCAT file and [Link] is the data of the
record in CONCAT file
CONCATFILE(FieldName) = ‘[Link]’:FM:’[Link]’
Slide 119
CONCAT Files
Slide 120
Non Stop Compliance
s40
Slide 121
Slide 121
Create the required fields for each of them using the API’s discussed
Slide 122
How to create additional components?
Slide 123
How to create additional components?
Slide 124
[Link]
s28
Verify record
Slide 125
Slide 125
s28 Important thing to mention here is where [Link] gets information to create each component
Slide 126
Workshop
s12
Slide 127
Slide 127
s12 Discuss about how to create all the additional components manually
salamelu, 2/20/2009
Day 5
Validation and Workshops
Slide 128
Data Validations
Data Validations
Slide 129
Validating Data
Slide 130
Validating Data
Slide 131
.RECORD Method – Debit Card Example – [Link]
s4
[Link]:
*Code to populate the value for security number
CALL [Link]([Link])
Y.TIME1 = FIELDS([Link],'.',1,1)
Y.TIME2 = FIELDS([Link],'.',2,1)
[Link] = Y.TIME1:Y.TIME2
* Is RESULTING YEAR a leap year? No. How are we going to tell this in our code
* CDT is a T24 subroutine used to CALCULATE DATE, if we specify the *number
number of
calendar dates, it will give the date after so many *calendar days. So let’s do a
plus 1 day and a minus of one day to *get the actual day
CALL CDT("",[Link],"+1C");
CALL CDT("",[Link],"-1C")
IF [Link]([Link]) EQ '' THEN
[Link]([Link]) = [Link]
END
Slide 132
Slide 132
Defaulting a date is not exactly a very good example - defaulting must be done only if the field is blank and hence the condition.
sara, 5/20/2009
.RECORD Method – Debit Card Example – [Link]
Slide 133
Error Messages
If called,
called the error message is displayed after the record is opened
Slide 134
.VALIDATE Method – Debit Card Example – [Link]
s30
VALIDATE:
* TODO - Add the validation code here.
* Set AF, AV and AS to the field, multi value and sub value and
* invoke [Link]
* Set ETEXT to point to the [Link]
Slide 135
Slide 135
s30 Refer to tech spec to see what validations must be done for the debit card applications
salamelu, 2/20/2009
.VALIDATE Method – Debit Card Example – [Link]
Slide 136
Workshop
Slide 137
.AUTHORISE Method – Debit Card Example – [Link]
PROCESS:
CALL [Link]
[Link] = [Link]([Link])
[Link] = [Link]([Link])
CALL [Link]([Link],[Link],[Link],[Link],[Link])
Y CUS = R
[Link] [Link]<[Link]>
DBC<DBC CUSTOMER>
[Link] = [Link]<[Link]>
[Link] = [Link]:'-':[Link]:'-':[Link]
[Link]
Y AMOUNT = [Link]([Link])
R NEW(DBT AMOUNT) + [Link]
Y DRAWN AMT
IF [Link] GT [Link] THEN
AF = [Link]
ETEXT = 'AMOUNT EXCEEDS MAX WITHDRAWAL AMOUNT'
CALL [Link]
END ELSE
CALL [Link]([Link],[Link],[Link])
END
END
Slide 138
.AUTHORISE Method – Debit Card Example – [Link]
Slide 139
Workshop
Slide 140
Day 6
Overrides
Workshopp
DAS & Workshop
Slide 141
Overrides
Overrides
Slide 142
Overrides Messages
Slide 143
Overrides And Error Messages
Values if any, must be passed in the TEXT variable itself before the call
to [Link]
Slide 144
.OVERRIDES Method – Debit Card Example – [Link]
s15
OVERRIDES:
* TODO Add your override here
* Set TEXT to be the key to the override you want to use form the OVERRIDE
table
* Set AF/AV/AS to be the field that is relevant to the override.
*
[Link]:
CALL [Link]([Link])
IF TEXT = 'NO'
NO THEN
GOTO [Link]
END
RETURN
Slide 145
Slide 145
s15 Make the trainees raise the override as per the spec
salamelu, 2/20/2009
.OVERRIDES Method – Debit Card Example – [Link]
Slide 146
DAS
Slide 147
DAS
DAS is now the standard that must be followed when writing queries for
an application
Slide 148
DAS
Slide 149
Components of DAS
In DAS each query defined has 2 parts – the user defined name for the
query and its description
Slide 150
I_DAS.APPLICATION
Must list down all possible query option to be allowed for the application
EQU
QU [Link]$[Link]
S. . .C $CUS O .C TO
O 1
EQU [Link]$[Link] TO 2
Slide 151
I_DAS.[Link]
COMMON/[Link]/DAS$CACHE(100),DAS$NOTES(100)
DAS$NOTES([Link]$[Link])
$ ( $ ) = 'List of cards p
per customer'
DAS$NOTES([Link]$[Link]) = 'Cards expiring before a date'
Slide 152
[Link]
For example, lets assume we need to define the two queries below
Slide 153
Defining the Queries
SUBROUTINE [Link]([Link],[Link],[Link])
$INSERT I_DAS.[Link]
$INSERT I_DAS.[Link]
$INSERT I_DAS
I DAS
[Link]:
[Link] = <[Link]>:[Link]
BEGIN CASE
CASE [Link] = [Link]$[Link]
[Link] = ‘CUSTOMER’
[Link] = ‘EQ’
[Link] = [Link]
CASE [Link] = [Link]$[Link]
[Link] = ‘[Link]’
[Link] = ‘EQ’
MY DATA = THE
[Link] [Link]<1>
ARGS<1> ;*
* Can
C use TODAY h
here t
too
[Link] = ‘AND’
[Link]<-1> = ‘[Link]’
[Link]<-1> = ‘LT’
[Link]<-1> = [Link]<2>
END CASE
RETURN
Note: [Link], [Link], [Link], [Link], [Link] are variable names that cannot be
changed The paragraph name has to be BUILD
changed. [Link].
DATA The ordering of insert files in the above code is very
important.
Slide 154
DAS
Slide 155
DAS
Advantages
Caching
D t b
Database specific
ifi query fformation
ti
Predefined selects for an application
Slide 156
DAS
[Link] = [Link]$[Link]
[Link] = ‘10001’
[Link] = ‘’ ;* Must mention $NAU or $HIS if required
CALL DAS(‘[Link]’,[Link],[Link],[Link])
This routine would not usuallyy be called byy code outside of a CALL DAS
Slide 157
More information
Slide 158
Workshop
Slide 159
Day 7
Multithreading
Running as COB and Service
Workshop
Slide 160
Day 8 & 9
Accounting
[Link]
Workshop
Slide 161
Accounting
Accounting
Slide 162
Accounting files in T24
[Link]
[Link]
[Link]
Slide 163
[Link]
Account related entries are raised ONLINE and OFFLINE for all
movements in the customer and internal accounts.
All entries in the CATEGORY range 1-19999 are held in this file.
Slide 164
[Link]
When the file is cleared during COB the contents is copied to a file by
name [Link] file
Slide 165
[Link]
Profit and Loss entries are raised ON-LINE and OFF-LINE and are kept
in the [Link] file.
All entries hitting the Category codes over 50000 are held in this file.
Slide 166
[Link]
When the file is cleared during COB the contents is copied to a file by name
CATEG ENT LWORK DAY file
[Link]
Slide 167
[Link]
When the file is cleared during COB the contents are copied to a file by
name [Link] file
Slide 168
Accounting in T24
Once the record is authorized, the entries are then transferred from
[Link] directory to the appropriate accounting files.
Any processing that has to happen before a record goes to INAU status
has to be done in the .PROCESS method
Slide 169
g10
[Link] Subroutine
s31
INITIALISATION
[Link]
[Link] [Link]
[Link]
APPEND..[Link]
[Link]
Slide 170
Slide 170
Building Entries
ENTRY<[Link]> = [Link]
ENTRY<[Link]> = ''
ENTRY<[Link]> = [Link]
ENTRY<[Link]> = [Link]
ENTRY<[Link]>
C.S .CU C = LCCY
CC ;
;* Set a value
a ue here
e e
ENTRY<[Link]> = 'TR'
ENTRY<[Link]> = [Link]
ENTRY<[Link]> = '1'
ENTRY<[Link]> = [Link]<[Link]>
ENTRY<[Link]> = "AC"
ENTRY<[Link]> = TODAY
Slide 171
[Link] Subroutine
[Link] is the core routine that will actually raise the entries
Has 4 parameters
Application Name
Type of Accounting
Entry Details
F
Forwardd Entry
E t Flag
Fl
[Link] can raise more than one entry at a time with just
one call to it
Slide 172
[Link] Parameters
3rd p
parameter – Arrayy containing
g entries,, separated
p by
y FM
Slide 173
[Link] Parameters
Slide 174
Important Note
Since the entries are already available, we do not have to populate the
[Link] variable again
Slide 175
Take a look at [Link]
Slide 176
Code for Accounting
Slide 177
[Link] Subroutine
[Link] is the no input field that gets updated with accounting entry
ids
Slide 178
Accounting in the Debit Card Example
Slide 179
[Link]
The [Link]
EB CONTRACT BALANCES file provides a single place for CRB
reporting to take its information.
It is possible to extract the balance at the close of the last working day
as well as the current balance.
Slide 180
[Link]
The balances are updated from the core accounting processing based on
the Consol entries raised by the underlying application – there is no direct
update from the underlying application.
Slide 181
Workshop
Raise accounting entries as per the requirement for the DEBIT CARD
example
Slide 182
D 10
Day 10, 11 & 12
Extra Information
Templates in R5
W k h
Workshop
Comparison between R5, R7 and R9 templates
Slide 183
Important Tidbits
Important Tidbits
Slide 184
HOOK Routines
How does T24 check is the data entered is in fact a valid routine name?
T(FieldPosition) = ‘HOOK’
Looks for an [Link] record for the data entered hence validating it
Slide 185
Transaction Boundaries in T24
Slide 186
Non Bulk OFS Requests
Slide 187
Bulk OFS Requests
s18
Slide 188
Slide 188
s18 Mention the use of the common variable cTxn_TransactionLevel that is set and which in turn causes the transaction block at
application level to be skipped
salamelu, 2/20/2009
[Link]
[Link]
First checks if requested record is in the cache (FWC, FWT, FWF)
Else reads from disk and loads into cache
Subsequent reads within subroutine execution is only from cache
Cache cleared after process termination
Slide 189
[Link]
[Link]
Checks if record is in cache ([Link], [Link],
S
[Link])
C )
Else reads from disk and loads into cache
This cache is session specific
Records that rarely change can be accessed using this – SPF,
SPF COMPANY
DON’T use this to read from ACCOUNT, CUSTOMER etc
Slide 190
Backward Compatibility
s16
Slide 191
Slide 191
s16 Also explain about C_METHODS flag array in templates before R9 and how methods are being called now
salamelu, 2/20/2009
[Link]
Slide 192
Other Subroutines Used in [Link]
MATRIX UPDATE
[Link]
[Link]
[Link] / [Link]
Slide 193
Interesting Core Subroutines Used So Far
CDD
CDT
DUP
Slide 194
Interesting Core Subroutines Used So Far
[Link]
Slide 195
Older Templates
Slide 196
Template Programming in R5 and lower
No [Link]
Slide 197
The TEMPLATE in R5
Slide 198
[Link]
Example :
IF INDEX(‘VH’,V$FUNCTION,1) THEN
E = ‘FUNCTION NOT ALLOWED FOR THIS APPLICATION’
CALL ERR
V$FUNCTION = ''
END
Slide 199
[Link]
E
Executed
t d as soon as th
the ID iis entered
t d
If an error is
i found
f d requiring
i i ththe id tto b
be re-input,
i t then
th ERROR mustt b
be
set so that T24 will ask for the record ID input again
Slide 200
[Link]
Slide 201
Major Difference in Validations
Validation of Data
Slide 202
[Link]
[Link]
[Link]
C C S XX DEFAULT FIELDS
[Link]
[Link]
Slide 203
Paragraphs in the [Link] Subroutine
Slide 204
[Link]
The third subfield of the ’N’ arrayy should be set to ’C’. This is to enable the
checkfile property.
N(Z) = ’35..C’
The value input will be in COMI and AF, AV and AS will be set.
The value entered will NOT have been assigned to [Link] at this stage.
Slide 205
[Link]
Slide 206
[Link]
Slide 207
Cross Validation
This section will be performed only when the record has been
committed and FUNCTION is 'I' or 'C'.
Slide 208
Cross Validations
Slide 209
[Link] Subroutine or Paragraph
Slide 210
Additional Processing
Slide 211
[Link]
Slide 212
[Link]
Slide 213
[Link]
Example :
BEGIN CASE
CASE [Link][1,3] = "INA"
CALL [Link]
CASE [Link][1,3]
RECORD STATUS[1 3] = "RNA"
CALL [Link]
END CASE
Slide 214
[Link]
Slide 215
What was defined where?
Slide 216
What was defined where?
Authorise
A th i method
th d was the
th [Link]
BEFORE AUTH WRITE paragraph
h iin th
the
TEMPLATE subroutine in R5
Slide 217
Workshop
Slide 218
Comparison of R5, R7 and R9 Templates
Slide 219
TEMPLATE Subroutine
In R5
Both application flow and business logic built into TEMPLATE
Different TEMPLATE subroutines for different application types
No properties and methods
All business functionality defines in paragraphs or call to routines
No naming conventions for these routines
In R7
Application flow in [Link]
Same TEMPLATE subroutine for all types of application
Business functionality in individual subroutines called methods
C_PROPERTIES used to define properties
C_METHODS flag array determines what methods to invoke
In R9
Table objects used to define properties
Any method that exists will automatically be invoked
Slide 220
[Link] Subroutine
In R5
No concept of [Link]
In R7
[Link] holds execution flow
.FIELDS method is made mandatory
Other methods invoked based on C_METHODS
C METHODS flag array
In R9
Subroutine modified to be compatible with using Table definitions
Any method that exists is automatically invoked
Slide 221
[Link]
In R5
This invokes the <Application> Subroutine
In R7
This invokes the <Application> Subroutine
The <Application> Subroutine (a copy of [Link]) in turn invokes
THE TEMPLATE
[Link]
In R9
This invokes both the <Application>
Application Subroutine and [Link]
Slide 222
Field Definitions
In R5
[Link] paragraph in TEMPLATE contains the field
definitions
ID F ID.N,
ID.F, ID N ID
ID.T,
T FF, N and T arrays are directly used to define the fields
fields.
In R7
In the .FIELDS method, ID.F, ID.N, ID.T, F, N and T arrays are directly used
to define the fields
In R9
In the .FIELDS method, there are a lot of API’s that can be used to define
fields which in turn populate values in the F, N and T arrays
There are 2 new insert files
• I_Table
I Table to define common variables used in Table object
• I_Datatypes which equates basic data types to standard names
Slide 223
Validations
In R5
Validations can be done at 2 levels,
• Field level validations – [Link] paragraph
• Input
I t level
l l validations
lid ti ((when
h user commits
it th
the record)
d) – CROSSVAL
paragraph
In R7
Validations are written in the .VALIDATE method
• Executed on clicking validate, commit and authorise buttons
For field level validations, field must be set as [Link] and code is
written in .VALIDATE method
• Executed on tab out of the field
In R9
Same as in R7
Slide 224
Creation of additional components
In R5
All components have to be created manually.
• [Link] at the jBASE prompt – to create the I_ file
• [Link]
PGM FILE and d [Link]
FILE CONTROL - to
t createt the
th respective
ti records
d
• [Link] at the Awaiting Application prompt – To create files at
database level
• [Link] – to rebuild the SS record of an application
pp
In R7
[Link] is a one stop shop to create all the additional
components
In R9
[Link]
EB DEV HELPER is
i a one stop
t shop
h to
t create
t allll the
th additional
dditi l
components
Slide 225
g11
Summary
Adequate knowledge to
Write code to raise accounting entries
entries, overrides
overrides, errors
errors, validations
Create Multi threaded subroutines
Slide 226
Slide 226
g11 Objective and Summary doesn't match slides followed by summary are about you will now be able to should be a part of notes page
gshital, 4/6/2010
You will now be able to …
Slide 227
You will now be able to …
T debug
To d b iissues arising
i i ffrom iincorrectt code
d
Slide 228
Thank You
TEMENOS EDUCATION CENTRE
NOTICE
These training materials are the copyrighted work of Temenos Headquarters SA and other companies in the TEMENOS group of companies
(The Copyright Owner). The training materials contain protected logos, graphics and images. Use of the training materials is restricted solely for
use by licensed end users, partners and employees. Any un-licensed reproduction by any means, redistribution, editing, transformation,
publishing, distribution, or public demonstration of the training materials whether for commercial or personal gain is expressly prohibited by law,
and may result in severe civil and criminal penalties. Violators will be prosecuted to the maximum extent possible. Such training materials shall
not be represented
represented, extracted into or included in part
part, or in whole
whole, as part of any other training documentation without the express permission of
the Copyright Owner, which must given in writing by an authorised agent of the Copyright Owner to be valid. Where such permission is given a
clear and prominent notice must be displayed on any and all documentation accrediting the Copyright Owner with having copyright over the
materials. End-user licenses will in no event contain permissions extending the use of these training materials to third parties for commercial
training purposes.
Without limiting the foregoing, copying or reproduction of the training materials in part or in whole to any other sever or location for further
reproduction or redistribution is expressly prohibited, unless such reproduction is expressly licensed by the Copyright Owner.
Copyright © 2010 Temenos Headquarters SA
The process of launching an application using TEMPLATE and THE.TEMPLATE in T24 involves several components and interactions. Initially, the application's name is typed at the command prompt. This triggers the VALIDATE.APPLICATION subroutine, which performs validations, including checks on the PGM.FILE. If validations are successful, RUN.APPLICATION is called, which then calls EB.EXECUTE.APPLICATION . This subroutine invokes the specific application subroutine that is essentially a copy of TEMPLATE with static properties and available methods . Additionally, THE.TEMPLATE comes into play, which contains the execution flow logic and calls methods or subroutines at required times . Thus, the interactions revolve around validation and the structured execution flow dictated by THE.TEMPLATE, ensuring consistent and efficient application execution.
Modifications to THE.TEMPLATE would have significant implications on both development and maintenance of applications within T24. THE.TEMPLATE serves as the backbone of application logic execution, defining a standardized operational sequence for method invocation . Altering it could disrupt this standardized sequence, leading to inconsistencies across applications and thus potential malfunctions or errors . Furthermore, since THE.TEMPLATE underpins the architecture of multiple applications, any changes would necessitate widespread adjustments across various application components and potentially introduce maintenance challenges as developers must ensure compatibility with the altered template . Thus, maintaining the integrity of THE.TEMPLATE is critical for cohesive and reliable application operations within T24.
TEMPLATE programming in T24 ensures code consistency and rapid development primarily through the use of THE.TEMPLATE subroutine. This subroutine serves as the core execution flow controller for applications, adhering to a fixed pattern that must not be modified . By having a predetermined order of method executions, such as INITIALISE, FIELDS, FUNCTION, and others, it ensures that applications follow a consistent execution path . This standardization allows developers to focus on writing specific business logic methods rather than designing application flow from scratch . Furthermore, the use of EB.DEV.HELPER supports rapid development by automating the creation of supplementary components like PGM.FILE entries, FILE.CONTROL entries, and databases . Collectively, these methodologies maintain code consistency and facilitate swift application development.
EB.DEV.HELPER automates several processes in T24 development, including the creation of PGM.FILE entries, FILE.CONTROL entries, and databases. It also assists in setting up additional components such as DAS routines and database-level files . The practical benefits of this automation are significant, as it reduces manual effort, minimizes errors, and accelerates the development process by automating routine tasks. Automation also ensures consistency across application components and facilitates quicker updates and maintenance when changes are required . Ultimately, it streamlines workflows and enhances productivity within the software development lifecycle in T24.
Managing multi-threaded routines within T24 applications presents several challenges, primarily relating to data integrity, thread synchronization, and efficient resource utilization. These challenges need careful handling to avoid concurrency issues. One solution provided by T24 is the creation of multi-threaded subroutines, which are designed to operate efficiently without conflict, by managing shared resources and ensuring that updates to shared data are appropriately synchronized . T24 also offers mechanisms such as COB (Close of Business) and Service modes, which facilitate the running of multi-threaded routines in controlled environments to maintain performance and reliability . Thus, while challenging, T24 provides structured solutions to effectively handle multithreading complexities.
EB.DEV.HELPER plays a crucial role in the automation and facilitation of application development in T24. It is utilized to create all the additional components necessary for an application's functioning, such as PGM.FILE entries, FILE.CONTROL entries, and database files . It becomes particularly necessary to use EB.DEV.HELPER when static properties of an application change, such as modifications to field names or addition of new fields, because it ensures that all relevant components are updated accordingly . This tool simplifies complex tasks, reducing manual errors and enhancing development efficiency.
T24 ensures effective validation processes within its applications through a structured approach involving dedicated methods specifically designed for validation tasks. The validation process is managed primarily by the VALIDATE method, which handles data validation for application entries . Furthermore, the ID method performs validation on the record identifiers, ensuring that entries are correctly formatted and unique . Additional validations and overrides can be catered to through CLIENT customization using version routines, which allow further refinement of business rules specific to client needs . This systematic method-based approach enables T24 to provide robust validation capabilities, essential for maintaining data integrity and accuracy in its applications.
Naming conventions in T24 TEMPLATE programming, specifically following the APPNAME.METHODNAME pattern, are crucial for method identification and execution within applications. These conventions ensure that the appropriate subroutines are called at the correct execution stage in applications, as defined by the execution flow managed by THE.TEMPLATE . The naming convention aids in organizing the various pieces of business logic into distinct subroutines, which are then sequenced orderly by THE.TEMPLATE to maintain a consistent and predictable application workflow . This approach minimizes errors and ensures that the method calls are precise, letting applications run effectively within the structured environment of T24.
The implementation of the .FIELDS method is critical in the execution of T24 applications, as it is integral in defining and managing mandatory fields within an application. Although THE.TEMPLATE itself does not enforce any method as mandatory, applications must have at least one field defined, making the .FIELDS method crucial in practice . This method is responsible for initiating the fields necessary for application execution, and without it, the application would lack structural integrity and fail to capture or process the required data inputs . Therefore, .FIELDS directly influences the application's ability to function correctly, ensuring that all necessary data elements are present and available for subsequent processing steps.
THE.TEMPLATE determines the sequence of method execution in T24 applications and plays a significant role in shaping application behavior. It establishes an orderly execution flow encompassing various predefined methods such as INITIALISE, FIELDS, FUNCTION, RECORD, VALIDATE, and more, which are executed in succession as defined . This sequence ensures a structured approach to application processing, maintaining consistency across different applications developed in T24 . By enforcing such a sequence, THE.TEMPLATE facilitates predictable application behavior, where every stage of processing – from initialization through to authorization – is methodically controlled, mitigating the risk of errors and enhancing robustness in application execution.