Вы находитесь на странице: 1из 41

VERSION ROUTINES

TEMENOS EDUCATION CENTRE

Warning: This document, is protected by copyright law and international treaties. 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 Unauthorized
reproduction or distribution of this presentation or any portion of it, may result in severe civil and
criminal penalties, and will be prosecuted to the maximum Copyright © 2004under
extent possible TEMENOS HOLDINGS
applicable law.” NV
Information in this document is subject to change without notice.

Copyright © 2005 TEMENOS HOLDINGS NV


Objectives

‰ To understand the need for version routines

‰ To understand the various types of version routines

‰ To understand the various fields in the version application to


which routines can be attached

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 2


Version Application

Version is an application in T24 that allows users to create


customized screens.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 3


Version Routines

Version routines allow us to add additional validation and


functionality to Versions.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 4


Version Routines

‰ Validation Routine
‰ Input Routine
‰ Authorization Routine

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 5


ID.NEW

‰ Dynamic array that contains the id of the currently opened


record.

‰ Defined in I_COMMON file.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 6


R.NEW

‰ It is a dimensioned array that has been defined in the file


I_COMMON.

‰ It holds the copy of the currently opened record in any application


in T24.

R.NEW(C$SYSDIM) where C$SYSDIM = 500

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 7


R.OLD

‰ It is a dimensioned array that has been defined in the


I_COMMON file.
‰ It holds a copy of an authorized record when it is opened for
amendment.

The definition for R.OLD in the I_COMMON file is as follows.

R.OLD(C$SYSDIM)

ID.OLD will hold the id of this corresponding record

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 8


R.NEW.LAST

‰ R.NEW.LAST is a dimensioned array that will hold a copy of an


unauthorized record when it is opened for amendment.

‰ Present in the I_COMMON file

The definition for R.NEW.LAST in the I_COMMON file is as


follows.

R.NEW.LAST(C$SYSDIM)

ID.NEW.LAST will hold the id of this corresponding record

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 9


HOT.FIELD

‰ When Browser is used as the front end, field level validations will
take place only if the field is set as a hot field.

‰ Defining a field as a hot field, automatically sends a validation


request to the server on change of data.

‰ Hot fields are shown with a next to them.

‰ To specify a field as a hot field, the version to which it belongs


must be amended.

‰ The field “ATTRIBS” should be set to “HOT.FIELD” to signify that


validation should be run when this field is exited.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 10


Validation Routine

‰ These routines, as the name implies validate data entered in a


particular field

‰ It can also be used to default values into fields

‰ It must be specified in the field VALIDATION.FLD in the Version


Application.

‰ These routines get invoked after a user presses the ‘TAB’ key.

‰ These routines get invoked when record is committed as well.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 11


Example 1

Create a version for the Funds Transfer application with the following
fields. As soon as the Debit Account Number is entered the appropriate
currency has to get defaulted in the Currency field. Make the Currency
field a NOINPUT field.

Fields that need to be part of the version

1. Transaction Type
2. Debit Account Number
3. Debit Currency
4. Debit Amount
5. Debit Value Date
6. Credit Account Number
7. Credit Currency

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 12


Solution 1 – Step 1

Create a version for the Funds Transfer application with the fields
mentioned in Example 2. Ensure that you make the
DEBIT.CURRENCY field a ‘NOINPUT’ field.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 13


Solution 1 – Step 2

Set the associated field attributes as HOT.FIELD for the field


DEBIT.ACCT.NO in the version

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 14


Solution 1 – Step 3

Create a subroutine to populate the currency of the debit account


number entered in the FT version.

All validation routines get invoked at input stage as well.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 15


Solution 1

MESSAGE – Common variable defined in I_COMMON which


holds the current function.

When a record is committed : VAL


When a record is authorized : AUT
When a record is put on hold : HLD

COMI - Dynamic array defined in I_COMMON that contains


the last entered value in any application/version.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 16


Solution 1 - Algorithm

‰ Extract the account number entered in the field Debit Account


Number

‰ Using the account number, read the Account file

‰ Extract the relevant Account record

‰ From the extracted record, extract the currency of the account and
display it in the field Debit Currency in the Version.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 17


Solution 1

*Version subroutine that will populate the debit currency based on *the
Debit Account Number.
SUBROUTINE V.TRG.VAL.RTN
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.ACCOUNT
$INSERT I_F.FUNDS.TRANSFER
IF MESSAGE NE ‘VAL’ THEN
Y.ACCT.NO = COMI ; Y.ACCT.CUR = ‘’
FN.ACCOUNT = ‘F.ACCOUNT’ ; F.ACCOUNT = ‘’
CALL OPF(FN.ACCOUNT,F.ACCOUNT)
CALL F.READ(FN.ACCOUNT,Y.ACCT.NO,R.ACCT.REC,F.ACCOUNT,ERR1)
Y.ACCT.CUR = R.ACCT.REC<AC.CURRENCY>
R.NEW(FT.DEBIT.CURRENCY) = Y.ACCT.CUR
CALL REBUILD.SCREEN
END
RETURN
END

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 18


Solution 1

‰ Compile and catalogue the subroutine and attach this routine.

‰ Make an entry in the PGM.FILE with the type as ‘S’ and attach it
to the VALIDATION.RTN (prefixed with an ‘@’ symbol) in the
version.

‰ Ensure that you specify ‘DEBIT.ACCT.NO’ in the field


VALIDATION.FLD

From R4 : Make an entry in EB.API for version routines


o Set PROTECTION.LEVEL to NONE
o Set SOURCE.TYPE to BASIC

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 19


Solution 1
Validation happens on pressing tab on the Hot Field

Debit Currency defaulted


by the routine

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 20


Workshop 1

TEMENOS EDUCATION CENTRE

Warning: This document, is protected by copyright law and international treaties. 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 Unauthorized
reproduction or distribution of this presentation or any portion of it, may result in severe civil and
criminal penalties, and will be prosecuted to the maximum Copyright © 2004under
extent possible TEMENOS HOLDINGS
applicable law.” NV
Information in this document is subject to change without notice.

21

Copyright © 2005 TEMENOS HOLDINGS NV


Input Routine

‰ These routines as the name implies get invoked just prior to


committing a transaction in the unauthorized stage.

‰ Multiple routines can be attached at this stage.

‰ Routines called at this stage may be used to provide additional


checking or override processing.

‰ At this point of the transaction all standard default and validation


processing would have taken place

‰ Input routines get invoked even when the record is put on hold.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 22


Example 2

Create a version for the FT application in which when the user


presses F5 to commit the record, a check has to be made to see
whether the Debit Account Currency and the Credit Account
Currency are the same. If not an error message “Debit and Credit
Account currency mismatch”, has to be displayed.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 23


Solution 2 – Step 1

Create a version for the FT application by name FT,INPUT with


all the mandatory fields.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 24


Solution 2 – Step 2

Create a subroutine that will extract the Debit Account


Currency and the Credit Account Currency from the version,
check if they are the same, if not flash an error message.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 25


Solution 2 - Algorithm

‰ Extract the value of the Debit Currency and the Credit


Currency from R.NEW.

‰ Check if the extracted values matches, else flash the above


mentioned error message.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 26


ETEXT And STORE.END.ERROR

‰ This is a T24 subroutine that is capable of displaying an error


message stored in a common variable ETEXT.

‰ The variable ETEXT always needs to be populated with the


error message before this subroutine is called.

‰ ETEXT has also been defined in the file I_COMMON.

ETEXT = “Error Message”


CALL STORE.END.ERROR

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 27


AF, AV And AS

‰ These are dynamic arrays defined in I_COMMON that can hold the
physical field number, multi value and sub value position (of fields)
respectively.

‰ Setting these variables before calling STORE.END.ERROR would


result in the display of these error messages adjacent to the field
which caused the error.

AF = 1
AV = 1
AS = 1

ETEXT = “Error”
CALL STORE.END.ERROR

Will cause the error message to be displayed adjacent to the field ‘1.1.1’.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 28


Solution 2

*Version input routine that checks if the debit and the credit currency
are *equal. Else flashes an error message
SUBROUTINE V.TRG.INP.RTN
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.FUNDS.TRANSFER
IF MESSAGE NE ‘HLD’ THEN
Y.DEBIT.CUR = R.NEW(FT.DEBIT.CURRENCY)
Y.CREDIT.CUR = R.NEW(FT.CREDIT.CURRENCY)
IF Y.DEBIT.CUR NE Y.CREDIT.CUR THEN
AF = FT.DEBIT.CURRENCY ; * Note that the field name
* has been used instead of field number
ETEXT = “Credit Acct Ccy Not Equal To Debit Acc Ccy”
CALL STORE.END.ERROR
END
END
RETURN
END

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 29


Solution 2 – Step 3

Compile and catalogue the subroutine and attach the subroutine


to the field ‘INPUT.ROUTINE’ in the version.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 30


Workshop 2

TEMENOS EDUCATION CENTRE

Warning: This document, is protected by copyright law and international treaties. 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 Unauthorized
reproduction or distribution of this presentation or any portion of it, may result in severe civil and
criminal penalties, and will be prosecuted to the maximum Copyright © 2004under
extent possible TEMENOS HOLDINGS
applicable law.” NV
Information in this document is subject to change without notice.

31

Copyright © 2005 TEMENOS HOLDINGS NV


Authorization Routine
‰ This is a routine that gets executed at the authorization stage of
a transaction.

‰ Multiple routines may be defined.

‰ Routines called at this stage may be used to update local files.

‰ At this point of the transaction all standard default and validation


processing will have taken place.

‰ This routine is invoked after a write is made to the buffer


meaning that changes made to R.NEW will not reflect in the
record unless an WRITE is made explicitly.

In this case, a call to F.WRITE should not be succeeded by a call to


JOURNAL.UPDATE as this is taken care of by T24 core.
T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 32
Example 3

Automate the process of creating a new record in the


DE.ADDRESS file with the following id when a new customer
record is authorized.

US0010001.C-100069.PRINT.2
Companycode.C-CustomerNo.PRINT.2

Get the second address from the customer through a local


reference field.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 33


Solution 3 - Algorithm

‰ Check if the customer record being authorized is a new customer


record

‰ Get the street and town country values for the second address through
a local reference field.

‰ Form a record for the DE.ADDRESS file with the short name, name.1,
name.2 (all the above mentioned 3 fields should be extracted from the
customer record being authorized.), street and town country( through
the local reference field)

‰ Form the id of the DE.ADDRESS file

‰ Write the record formed into the DE.ADDRESS file using the routine
OFS.POST.MESSAGE

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 34


ID.COMPANY

This is a dynamic array that is defined in the I_COMMON file which


holds the id of the current company.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 35


OFS.POST.MESSAGE

Syntax

CALL OFS.POST.MESSAGE(Y.OFS.MESSAGE, OFS.MSG.ID,


OFS.SOURCE.ID, OPTIONS)

Application name, record id and field information's will be passed


through the first argument Y.OFS.MESSAGE

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 36


OFS.POST.MESSAGE

‰ The supplied OFS message will get written on to a file named


F.OFS.MESSAGE.QUEUE.

‰ OFS.MESSAGE.SERVICE picks up the data and processes.

‰ Once the message is processed, the response is written on to an


out queue named F.OFS.RESPONSE.QUEUE.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 37


Solution 3

SUBROUTINE V.TRG.AUTH.RTN
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.CUSTOMER
$INSERT I_F.DE.ADDRESS
*
GOSUB INIT
GOSUB OPENFILES
GOSUB PROCESS
RETURN
*
INIT:
FN.CUS = 'F.CUSTOMER'
F.CUS = ''
Y.ADDRESS = ''
RETURN

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 38


Solution 3 (Cont.)

OPENFILES:
CALL OPF(FN.CUS,F.CUS)
RETURN

PROCESS:
IF R.OLD(1) = '' THEN ;* If it is a new record being authorised

* Form the id of the DE.ADDRESS record

Y.DE.ADDRESS.ID = ID.COMPANY:'.C-':ID.NEW:'.PRINT.2‘

Y.ADDRESS = R.NEW(EB.CUS.LOCAL.REF)<1,7>

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 39


Solution 3 (Cont.)

Y.OFS.REC=“DE.ADDRESS/I/PROCESS,TRAIN03/654321,”:Y.DE.ADDRE
SS.ID:”,”:BRANCHNAME=R.NEW(EB.CUS.SHORT.NAME):”,”:DE.ADD.NA
ME.1=R.NEW(EB.CUS.NAME.1):”,”:DE.ADD.NAME.2=R.NEW(EB.CUS.NA
ME.2):”,”:DE.ADD.STREET.ADDRESS= Y.ADDRESS“

OFS.MSG.ID="“
OFS.SOURCE.ID="GCS“
OPTIONS="“

CALL OFS.POST.MESSAGE (Y.OFS.REC, OFS.MSG.ID,


OFS.SOURCE.ID, OPTIONS)

END

RETURN
END

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 40


Solution 3 (Cont.)

Create a version of the Customer application with all the


mandatory fields, compile and catalogue the subroutine and
attach it to the version.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV 41

Вам также может понравиться