Professional Documents
Culture Documents
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 THE.TEMPLATE 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, T24.BP and
bnk.run
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
ID.NEW
ID.OLD
ID.NEW.LAST
R.NEW()
R.OLD()
R.NEW.LAST()
Slide 20
What Happens When A New Record Is Created In T24?
Slide 21
ID.NEW
Slide 22
R.NEW
ID.NEW holds the ID of the currently opened record, while R.NEW holds the
actual record. ‘R’ in the variable name stands for ‘Record’
Inference : Since the size of R.NEW 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 R.NEW only are written into the database when record is COMMITTED/AUTHORISED
Slide 24
ID.NEW.LAST
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
R.NEW.LAST
Slide 26
What Happens When An Authorized Record Is Amended?
Values from R.NEW only are written into the database when record is COMMITTED/AUTHORISED
Slide 27
ID.OLD
Slide 28
R.OLD
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 (FBNK.SECTOR$HIS)
Contents
C t t off R.NEW
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 R.NEW and R.NEW.LAST 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 R.NEW.LAST 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
R.USER - 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?
PGM.FILE Entry
Type of application
Special properties (additional info)
FILE.CONTROL 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
STANDARD.SELECTION 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/OBJECT.TEMPLATE/Table.fieldNeighbourArray(C$SYSDIM),Table.name,
Table.title,
Table.stereotype,
Table.product,
Table.subProduct,
Table.idPrefix,
Table.blockedFunctions,
Table.systemClearFile,
Table.relatedFiles,
Table.isPostClosingFile,
Table.equatePrefix,
bl fi
Table.triggerField,
Table.classification,
Table.noInputFields,
Table.inputtableFields,
Table lastApplication
Table.lastApplication,
Table.idPrefix,
Table.blockedFunctions,
Table.systemClearFile,
Table.relatedFiles,
Table.isPostClosingFile,
Table.equatePrefix,
Table.triggerField,
Table.lastCompany,
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 THE.TEMPLATE 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
EB.EXECUTE.APPLICATION
SUBROUTINE EB.EXECUTE.APPLICATION(APPLICATION.NAME)
.
.
.
Table.name = ''
CALL @APPLICATION.NAME
IF Table
Table.name
name THEN
CALL THE.TEMPLATE ;* We need to call the central template routine
END ELSE
Table.lastApplication = "" ;* We've called a non central template
END
.
.
.
.
.
Slide 43
THE.TEMPLATE Subroutine
s6
Slide 44
Slide 44
s6 Explain about the flow in THE.TEMPLATE 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 APPNAME.METHODNAME
APPNAME METHODNAME
Slide 45
Slide 45
s7 Though THE.TEMPLATE 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.AND.PROPERTIES
Slide 47
I_METHODS.AND.PROPERTIES
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 THE.TEMPLATE flow
Slide 50
THE.TEMPLATE
Slide 51
Behind the Scenes – THE.TEMPLATE
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 UNAUTH.RECORD.WRITE.
salamelu, 2/20/2009
Behind the Scenes – THE.TEMPLATE
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 – THE.TEMPLATE
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 (ID.NEW)
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 (R.NEW,
R.NEW.LAST,R.OLD)
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
R.NEW, R.NEW.LAST, R.OLD, E, Subroutine ERR
OVERRIDES
Overrides if any, must be raised here
R.NEW, R.NEW.LAST, R.OLD, ETEXT, Subroutine STORE.OVERRIDE
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 - THE.TEMPLATE
Slide 62
Digging Deep - THE.TEMPLATE
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 - THE.TEMPLATE
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 - THE.TEMPLATE
FIELD.INPUT and FIELD.DISPLAY are two core routines that take care
of displaying the application screen
Slide 65
Digging Deep - THE.TEMPLATE
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 - THE.TEMPLATE
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 PGM.FILE
PREVIEW method
P i
Preview generated
t d using
i core routine,
ti EB
EB.HANDOFF
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 FT.TXN.TYPE.CONDITION 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 - THE.TEMPLATE
Overrides
O id come nextt
No option to reject overrides, just change data and Commit again
OVERRIDES method
Slide 68
Digging Deep - THE.TEMPLATE
Slide 69
Digging Deep - THE.TEMPLATE
VALIDATE method
AUTHORISE method
Slide 70
JOURNAL ???
F.JOURNAL
F.JOURNAL at any given time will only hold the last 20 transactions per user
F WRITE writes
F.WRITE it tot cache
h
FWC, FWT, FWF
Note: F.JOURNAL will hold the transaction details only if the field INFO.JOURNAL 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 = ‘DEBIT.CARD.ID’
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> - HOT.FIELD/HOT.VALIDATE/WEB.VALIDATE
HOT.FIELD causes field to be validated immediately
HOT.VALIDATE causes all fields to be validated
WEB.VALIDATE 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/DataType.list,
DataType.nArrays,
DataType.tArrays,
DataType.checkFiles
Slide 89
TableUtil.loadFieldTypes
s11
IF NOT(DataType.list) THEN
CALL TableUtil.loadFieldTypes
END
Slide 90
Slide 90
s11 Explain why the values populated for the datatypes by this subroutine, are session specific
salamelu, 2/20/2009
TableUtil.loadFieldTypes
SUBROUTINE TableUtil.loadFieldTypes
id = "T24.STRING"
length = 35
type = "A"
file = ''
GOSUB addBasicType
addBasicType:
typePos +=1
DataType.list<typePos> = id
DataType.nArrays<typePos> = length
DataType.tArrays<typePos> = LOWER(type)
DataType.checkFiles<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
Table.defineId
Table.defineId(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
Table.defineIdProperties
Table.defineIdProperties(idName, dataType)
SUBROUTINE EB.DEBIT.CARD.PARAMETER.FIELDS
dataType = ''
dataType<2> = 16.1
dataType<3> = ''
CALL Table.defineId("DB.PARAMETER.ID",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
Table.addField
CALL Table.addField("XX.LL.DESCRIPTION",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
Table.addFieldDefinition
s47
CALL Table.addFieldDefinition("XX.LL.DESCRIPTION",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
Table.processArgs
s41
It takes 3 parameters,
parameters where
where,
• args – the list of arguments passed to Table.addField.
• nArrayItem - The N array item to process
• tArrayItem - The T array item to process
Slide 98
Slide 98
ARGS = Field_Mandatory:",":Field_AllowNegative
CALL Table.addField("TEST.AMOUNT",T24_Numeric,ARGS,'')
salamelu, 3/6/2009
Field.setAttributes
Slide 99
EB.LOOKUP
T24 allows us to hard code drop down options for a field in the T array
Slide 100
Table.addFieldWithEbLookup
Slide 101
Table.addVirtualTableField
Table.addVirtualTableField(fieldName,
( tableName, args,
g neighbour)
g )
Slide 102
Field.setDefault
CALL Table.addField("START.DATE",T24_Date,Field_NoInput,'')
CALL Field.setDefault(TODAY) ;* Assign default value
Slide 103
CHECKFILES
Slide 104
Field.setCheckFile
s39
CALL Table.addField("CUSTOMER",T24_Customer,Field_Mandatory,'')
CALL Field.setCheckFile("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 ID.CHECKFILE
salamelu, 3/3/2009
Field.setCheckFile
s52
CALL Table.addField("CUSTOMER",T24_Customer,Field_Mandatory,'')
CALL Field.setCheckFile("CUSTOMER")
Slide 106
Slide 106
s52 No specific API for defining checkfile for ID. WE have to use ID.CHECKFILE
salamelu, 3/3/2009
Table.addAmountField
Slide 107
Table.addOptionsField
CALL Table.addOptionsField("WITHDRAW.SWIPE","S_W",'','')
Slide 108
Table.addYesNoField
Slide 109
Table.setAttributeOnFields
Table.setAttributeOnFields(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
Table.addReservedField
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
Table.addDeliveryReferenceField
Applications that raise delivery events must define a field to hold the
delivery references
CALL Table.addDeliveryReferenceField(neighbour)
Slide 112
Table.addLocalReferenceField
Local reference fields allows T24 clients to add user definable fields to
the application.
CALL Table.addLocalReferenceField(neighbour)
Slide 113
Table.addStatementNumbersField
Applications that raise accounting entries must define a field to hold the
entry ids that have been raised
CALL Table.addStatementNumbersField(neighbour)
Slide 114
Table.addOverrideField
CALL Table.addOverrideField
Table addOverrideField
Slide 115
Table.setAuditPosition
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 STMT.NOS field must precede the overrides field.
Slide 118
CONCAT Files
Example - CUSTOMER.ACCOUNT
When CONCAT file is specified for a field in the application, data from
field is ID to record in CONCAT file and ID.NEW is the data of the
record in CONCAT file
CONCATFILE(FieldName) = ‘ID.OPTION’:FM:’APPLICATION.NAME’
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
EB.DEV.HELPER
s28
Verify record
Slide 125
Slide 125
s28 Important thing to mention here is where EB.DEV.HELPER 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 – EB.DEBIT.CARD
s4
POPULATE.COMMONS:
*Code to populate the value for security number
CALL ALLOCATE.UNIQUE.TIME(RESULT.TIME)
Y.TIME1 = FIELDS(RESULT.TIME,'.',1,1)
Y.TIME2 = FIELDS(RESULT.TIME,'.',2,1)
Y.TIME = 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("",Y.END.DAY,"+1C");
CALL CDT("",Y.END.DAY,"-1C")
IF R.NEW(DBC.END.DATE) EQ '' THEN
R.NEW(DBC.END.DATE) = Y.END.DAY
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 – EB.DEBIT.CARD
Slide 133
Error Messages
If called,
called the error message is displayed after the record is opened
Slide 134
.VALIDATE Method – Debit Card Example – EB.DEBIT.CARD
s30
VALIDATE:
* TODO - Add the validation code here.
* Set AF, AV and AS to the field, multi value and sub value and
* invoke STORE.END.ERROR
* Set ETEXT to point to the EB.ERROR.TABLE
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 – EB.DEBIT.CARD
Slide 136
Workshop
Slide 137
.AUTHORISE Method – Debit Card Example – EB.DEBIT.CARD
PROCESS:
CALL EB.DEBIT.CARD.TRANS.ACCOUNTING
Y.DATE = R.NEW(DBT.VALUE.DATE)
Y.CARD.NUM = R.NEW(DBT.CARD.NUMBER)
CALL F.READ(FN.DBC,Y.CARD.NUM,R.DBC,F.DBC,DBC.ERR)
Y CUS = R
Y.CUS R.DBC<DBC.CUSTOMER>
DBC<DBC CUSTOMER>
Y.ACC = R.DBC<DBC.ACCOUNT>
Y.ATM.ID = Y.CUS:'-':Y.ACC:'-':Y.DATE
Y.AMOUNT
Y AMOUNT = R.NEW(DBT.AMOUNT)
R NEW(DBT AMOUNT) + Y.DRAWN.AMT
Y DRAWN AMT
IF Y.AMOUNT GT Y.MAX.AMT THEN
AF = DBT.AMOUNT
ETEXT = 'AMOUNT EXCEEDS MAX WITHDRAWAL AMOUNT'
CALL STORE.END.ERROR
END ELSE
CALL F.WRITE(FN.ATM,Y.ATM.ID,Y.AMOUNT)
END
END
Slide 138
.AUTHORISE Method – Debit Card Example – EB.DEBIT.CARD
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 STORE.OVERRIDE
Slide 144
.OVERRIDES Method – Debit Card Example – EB.DEBIT.CARD
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.
*
DO.OVERRIDE:
CALL STORE.OVERRIDE(CURR.NO)
IF TEXT = 'NO'
NO THEN
GOTO EXIT.SUB
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 – EB.DEBIT.CARD
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 DAS.EB.DEBIT.CARD$CUSTOMER.CARD
S. . .C $CUS O .C TO
O 1
EQU DAS.EB.DEBIT.CARD$CARD.VALIDITY TO 2
Slide 151
I_DAS.APPLICATION.NOTES
COMMON/DAS.APPLICATION/DAS$CACHE(100),DAS$NOTES(100)
DAS$NOTES(DAS.EB.DEBIT.CARD$CUSTOMER.CARD)
$ ( $ ) = 'List of cards p
per customer'
DAS$NOTES(DAS.EB.DEBIT.CARD$CARD.VALIDITY) = 'Cards expiring before a date'
Slide 152
DAS.APPLICATION
For example, lets assume we need to define the two queries below
Slide 153
Defining the Queries
SUBROUTINE DAS.EB.DEBIT.CARD(THE.LIST,THE.ARGS,TABLE.SUFFIX)
$INSERT I_DAS.EB.DEBIT.CARD
$INSERT I_DAS.EB.DEBIT.CARD.NOTES
$INSERT I_DAS
I DAS
BUILD.DATA:
MY.TABLE = <EB.DEBIT.CARD>:TABLE.SUFFIX
BEGIN CASE
CASE MY.CMD = DAS.EB.DEBIT.CARD$CUSTOMER.CARD
MY.FIELDS = ‘CUSTOMER’
MY.OPERANDS = ‘EQ’
MY.DATA = THE.ARGS
CASE MY.CMD = DAS.EB.DEBIT.CARD$CARD.VALIDITY
MY.FIELDS = ‘START.DATE’
MY.OPERANDS = ‘EQ’
MY DATA = THE
MY.DATA THE.ARGS<1>
ARGS<1> ;*
* Can
C use TODAY h
here t
too
MY.JOINS = ‘AND’
MY.FIELDS<-1> = ‘END.DATE’
MY.OPERANDS<-1> = ‘LT’
MY.DATA<-1> = THE.ARGS<2>
END CASE
RETURN
Note: MY.TABLE, MY.FIELDS, MY.OPERANDS, MY.DATA, MY.JOINS are variable names that cannot be
changed The paragraph name has to be BUILD
changed. BUILD.DATA.
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
THE.LIST = DAS.EB.DEBIT.CARD$CUSTOMER.CARD
THE.ARGS = ‘10001’
TABLE.SUFF = ‘’ ;* Must mention $NAU or $HIS if required
CALL DAS(‘EB.DEBIT.CARD’,THE.LIST,THE.ARGS,TABLE.SUFF)
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
XX.ACCOUNTING
Workshop
Slide 161
Accounting
Accounting
Slide 162
Accounting files in T24
STMT.ENTRY
CATEG.ENTRY
RE.CONSOL.SPEC.ENTRY
Slide 163
STMT.ENTRY
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
STMT.ENTRY
When the file is cleared during COB the contents is copied to a file by
name ACCT.ENT.LWORK.DAY file
Slide 165
CATEG.ENTRY
Profit and Loss entries are raised ON-LINE and OFF-LINE and are kept
in the CATEG.ENTRY file.
All entries hitting the Category codes over 50000 are held in this file.
Slide 166
CATEG.ENTRY
When the file is cleared during COB the contents is copied to a file by name
CATEG ENT LWORK DAY file
CATEG.ENT.LWORK.DAY
Slide 167
RE.CONSOL.SPEC.ENTRY
When the file is cleared during COB the contents are copied to a file by
name CONSOL.ENT.LWORK.DAY file
Slide 168
Accounting in T24
Once the record is authorized, the entries are then transferred from
ENTRY.HOLD 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
XX.ACCOUNTING Subroutine
s31
INITIALISATION
PRODUCE.ENTRIES
APPEND.LIVE.ENTRIES APPEND.LIVE.ENTRIES
APPEND.FORWARD.ENTRIES
APPEND..FORWARD.ENTRIES
MULTI.ENTRIES
Slide 170
Slide 170
Building Entries
ENTRY<AC.STE.COMPANY.CODE> = ID.COMPANY
ENTRY<AC.STE.TRANSACTION.CODE> = ''
ENTRY<AC.STE.THEIR.REFERENCE> = ID.NEW
ENTRY<AC.STE.VALUE.DATE> = VALUE.DATE
ENTRY<AC.STE.CURRENCY>
C.S .CU C = LCCY
CC ;
;* Set a value
a ue here
e e
ENTRY<AC.STE.POSITION.TYPE> = 'TR'
ENTRY<AC.STE.OUR.REFERENCE> = ID.NEW
ENTRY<AC.STE.CURRENCY.MARKET> = '1'
ENTRY<AC.STE.DEPARTMENT.CODE> = R.USER<EB.USE.DEPT.CODE>
ENTRY<AC.STE.SYSTEM.ID> = "AC"
ENTRY<AC.STE.BOOKING.DATE> = TODAY
Slide 171
EB.ACCOUNTING Subroutine
EB.ACCOUNTING 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
EB.ACCOUNTING can raise more than one entry at a time with just
one call to it
Slide 172
EB.ACCOUNTING Parameters
3rd p
parameter – Arrayy containing
g entries,, separated
p by
y FM
Slide 173
EB.ACCOUNTING Parameters
Slide 174
Important Note
Since the entries are already available, we do not have to populate the
MULTI.ENTRIES variable again
Slide 175
Take a look at XX.ACCOUNTING
Slide 176
Code for Accounting
Slide 177
XX.ACCOUNTING Subroutine
STMT.NOS is the no input field that gets updated with accounting entry
ids
Slide 178
Accounting in the Debit Card Example
Slide 179
EB.CONTRACT.BALANCES
The EB.CONTRACT.BALANCES
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
EB.CONTRACT.BALANCES
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 EB.API 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
F.READ
F.READ
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
CACHE.READ
CACHE.READ
Checks if record is in cache (STATIC.INDEX, STATIC.DETAILS,
S
STATIC.DATA)
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
THE.TEMPLATE
Slide 192
Other Subroutines Used in THE.TEMPLATE
MATRIX UPDATE
MATRIX.UPDATE
MATRIX.ALTER
FIELD.DISPLAY / FIELD.MULTI.DISPLAY
Slide 193
Interesting Core Subroutines Used So Far
CDD
CDT
DUP
Slide 194
Interesting Core Subroutines Used So Far
EB.CALL.API
Slide 195
Older Templates
Slide 196
Template Programming in R5 and lower
No THE.TEMPLATE
Slide 197
The TEMPLATE in R5
Slide 198
CHECK.FUNCTION
Example :
IF INDEX(‘VH’,V$FUNCTION,1) THEN
E = ‘FUNCTION NOT ALLOWED FOR THIS APPLICATION’
CALL ERR
V$FUNCTION = ''
END
Slide 199
CHECK.ID
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
CHECK.RECORD
Slide 201
Major Difference in Validations
Validation of Data
Slide 202
CHECK.FIELDS
CHECK.FIELDS
XX.CHECK.FIELDS
C C S XX DEFAULT FIELDS
XX.DEFAULT.FIELDS
DEFAULT.OTHER.FIELDS
Slide 203
Paragraphs in the XX.CHECK.FIELDS Subroutine
Slide 204
CHECK.FIELDS
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 R.NEW at this stage.
Slide 205
CHECK.DELETE
Slide 206
CHECK.REVERSAL
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
XX.OVERRIDE Subroutine or Paragraph
Slide 210
Additional Processing
Slide 211
BEFORE.UNAUTH.WRITE
Slide 212
AFTER.UNAUTH.WRITE
Slide 213
BEFORE.AUTH.WRITE
Example :
BEGIN CASE
CASE RECORD.STATUS[1,3] = "INA"
CALL XX.AUTHORISATION
CASE RECORD.STATUS[1,3]
RECORD STATUS[1 3] = "RNA"
CALL XX.REVERSAL
END CASE
Slide 214
AFTER.AUTH.WRITE
Slide 215
What was defined where?
Slide 216
What was defined where?
Authorise
A th i method
th d was the
th BEFORE.AUTH.WRITE
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 THE.TEMPLATE
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
THE.TEMPLATE Subroutine
In R5
No concept of THE.TEMPLATE
In R7
THE.TEMPLATE 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
EB.EXECUTE.APPLICATION
In R5
This invokes the <Application> Subroutine
In R7
This invokes the <Application> Subroutine
The <Application> Subroutine (a copy of THE.TEMPLATE) in turn invokes
THE TEMPLATE
THE.TEMPLATE
In R9
This invokes both the <Application>
Application Subroutine and THE.TEMPLATE
Slide 222
Field Definitions
In R5
DEFINE.PARAMETERS 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 – CHECK.FIELDS 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 HOT.FIELD 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.
• FILE.LAYOUT at the jBASE prompt – to create the I_ file
• PGM.FILE
PGM FILE and d FILE.CONTROL
FILE CONTROL - to
t createt the
th respective
ti records
d
• CREATE.FILES at the Awaiting Application prompt – To create files at
database level
• STANDARD.SELECTION – to rebuild the SS record of an application
pp
In R7
EB.DEV.HELPER is a one stop shop to create all the additional
components
In R9
EB.DEV.HELPER
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