ITSS - Workshop.Exercise01 PT04

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Workshop Name: Exercise01

Workshop Result Document


Document History:
Date Author Status Comments
04-MAR-2020 BALA BHARATHI Initial Added scenario 1.
05-MAR-2020 BALA BHARATHI Initial Added scenario 2,3,4 and 5.
06-MAR-2020 BALA BHARATHI Initial Added scenario 8 and 9.
Scope:

This document will help to understand the various functionality of programing workshop with
different business logics in T24.

Workshop Result:
Scenario1:

Need to capture VERSION.NAME by using which a USER has inputted and authorized a
record. Create a parameter table and configure for all the application this routine should trigger
at INPUT level and AUTHORISE level. For example., if the user configures
FUNDS.TRANSFER, PAYMENT.ORDER, TELLER etc., then the routine should capture
INPUT version name and AUTH version name and update in TWO local reference fields in the
same application. So, create two LOCAL.REF call INP.VERSION and AUTH.VERSION and
attach in all applications which are configured in the parameter you create above.
Note: The routine you develop should not be attached at VERSION level.

Case:

To capture VERSION.NAME by using which a USER has inputted and authorized a record in TWO
local reference fields in the same application.

Result:

A “Validation Routine” and “Auth Routine” to capture VERSION.NAME by using which a USER has inputted and
authorized a record in TWO local reference fields in the same application is executed and verified.

Observation:

The VERSION.NAME is captured and assigned to the local ref fields by using API MultiGetLocalRef and
Rebuild.Screen.

Detail Steps:

Step1:
Write your “Validation Routine” and “Auth Routine” to capture VERSION.NAME by using which a USER
has inputted and authorized a record in TWO local reference fields in the same application.
$PACKAGE EB.PT04BALABHARATHI
SUBROUTINE PT04.CAPTURE.VERSIONNAME.IN.LOCFIELD
*--------------------------------------------------------------------------
$USING EB.API
$USING EB.SystemTables
$USING EB.DataAccess
$USING EB.Updates
$USING EB.Display
*--------------------------------------------------------------------------
APP.NAME = EB.SystemTables.getApplication()
VERSION.NAME = EB.SystemTables.getPgmVersion()
V.FUNCTION = EB.SystemTables.getVFunction()
*--------------------------------------------------------------------------
Y.FIELDS = "INP.VERSION" :@VM : "AUTH.VERSION"
EB.Updates.MultiGetLocRef(APP.NAME, Y.FIELDS, FIELDS.POS)
INP.VERSION.POS = FIELDS.POS<1,1>
AUTH.VERSION.POS = FIELDS.POS<1,2>
*--------------------------------------------------------------------------
IF V.FUNCTION EQ "I" THEN
R.ARR1<1,INP.VERSION.POS> = VERSION.NAME
END
IF V.FUNCTION EQ "A" THEN
R.ARR1<1,AUTH.VERSION.POS> = VERSION.NAME
END
EB.Display.RebuildScreen()
*--------------------------------------------------------------------------
RETURN
END

Step3:
Create a EB.API entry for your routine.
EB.API........... PT04.CAPTURE.VERSIONNAME.IN.LOCFIELD
---------------------------------
1. 1 GB DESCRIPTION.
2 PROTECTION.LEVEL.. NONE
3 SOURCE.TYPE....... BASIC
Step4:
Attach your routine to your VERSION.CONTROL in “Validation Rtn” and “Auth Rtn” field.
VERSION.CONTROL...... FUNDS.TRANSFER
-----------------------------------------------------
Auto Field Name.1
Auto Old Cont.1
Auto Field Rtn.1
Field Name.1
Validation Rtn.1 @PT04.CAPTURE.VERSIONNAME.IN.LOCFIELD
Input Rtn.1
Auth Rtn.1 @PT04.CAPTURE.VERSIONNAME.IN.LOCFIELD
Id Rtn.1
Check Rec Rtn.1
After Unau Rtn.1
Before Auth Rtn.1
Non Version Run Y
Inputter.1 3896_BALA2__OFS_BROWSERTC
Date Time.1 04 MAR 20 17:03 04 MAR 20 17:03
Authoriser 3896_BALA2_OFS_BROWSERTC
Co Code GB0010001 Model Bank
Dept Code 7 Treasury Supervisor
Auditor Code
Audit Date Time
Step5:
Input a record using any of your application’s version and commit the record.
Step6:
Confirm the result by checking the values on the local ref fields.
Scenario2:

Calculate a special charge for CUSTOMER with SECTOR EQ 1001 and


CUSTOMER.RATING as AA. Charge 5% if the customer rating is AAA then WAIVE all his
CHARGES while doing a payment transaction in FUNDS.TRANSFER WHILE DOING OT
transaction.

Case:

To write a routine to calculate the special charges for the customer according to their SECTOR.

Result:

An “Input Routine” to calculate the special charges for the customer according to their SECTOR is executed
and verified.

Observation:

Charges are applied according to the CUSTOMER.RATING, if the rating is “AA” then special charges is applied
and if the rating is “AAA” 5% charges is applied.

Detail Steps:

Step1:
Create your FT version with all the required fields.
Step2:
Write your “Input Routine” to calculate the special charges for the customer according to their
SECTOR and CUSTOMER.RATING.
$PACKAGE EB.PT04BALABHARATHI
SUBROUTINE PT04.FT.CHARGES.BASED.ON.CS.RATING
*----------------------------------------------------------------------------
$USING EB.SystemTables
$USING EB.API
$USING EB.DataAccess
$USING FT.Contract
$USING ST.Customer
*----------------------------------------------------------------------------
FN.FT = "F.FUNDS.TRANSFER"
FV.FT = ""
EB.DataAccess.Opf(FN.FT,FV.FT)
FN.CUSTOMER = "F.CUSTOMER"
FV.CUSTOMER = ""
EB.DataAccess.Opf(FN.CUSTOMER,FV.CUSTOMER)
R.CUSTOMER = "" ; R.CUSTOMER.ERR = ""
*----------------------------------------------------------------------------
FT.TXN.TYPE =
EB.SystemTables.getRNew(FT.Contract.FundsTransfer.TransactionType)
IF FT.TXN.TYPE EQ "OT" THEN
FT.DEBIT.CUSTOMER =
EB.SystemTables.getRNew(FT.Contract.FundsTransfer.DebitCustomer)
FT.DEBIT.AMOUNT =
EB.SystemTables.getRNew(FT.Contract.FundsTransfer.DebitAmount)

EB.DataAccess.FRead(FN.CUSTOMER,FT.DEBIT.CUSTOMER,R.CUSTOMER,FV.CUSTOMER,
R.CUSTOMER.ERR)
CUSTOMER.SECTOR = R.CUSTOMER<ST.Customer.Customer.EbCusSector>
CUSTOMER.RATING = R.CUSTOMER<ST.Customer.Customer.EbCusCustomerRating>
IF CUSTOMER.SECTOR EQ "1001" THEN
IF CUSTOMER.RATING EQ "AA" THEN
SPECIAL.RATE = 2
SPECIAL.CHARGES = (FT.DEBIT.AMOUNT)*(SPECIAL.RATE/100)

EB.SystemTables.setRNew(FT.Contract.FundsTransfer.ChargeAmt,SPECIAL.CHARGES)
END
IF CUSTOMER.RATING EQ "AAA" THEN
NORMAL.RATE = 5
SPECIAL.CHARGES = (FT.DEBIT.AMOUNT)*(NORMAL.RATE/100)

EB.SystemTables.setRNew(FT.Contract.FundsTransfer.ChargeAmt,SPECIAL.CHARGES)
END
END
END
*----------------------------------------------------------------------------
RETURN
END

Step3:
Create a EB.API entry for your routine.
EB.API........... PT04.FT.CHARGES.BASED.ON.CS.RATING
---------------------------------
1. 1 GB DESCRIPTION.
2 PROTECTION.LEVEL.. NONE
3 SOURCE.TYPE....... BASIC
Step4:
Attach your routine to your VERSION.CONTROL in “Input Rtn” field.
VERSION.CONTROL...... FUNDS.TRANSFER
-----------------------------------------------------
Auto Field Name.1
Auto Old Cont.1
Auto Field Rtn.1
Field Name.1
Validation Rtn.1
Input Rtn.1 @PT04.FT.CHARGES.BASED.ON.CS.RATING
Auth Rtn.1
Id Rtn.1
Check Rec Rtn.1
After Unau Rtn.1
Before Auth Rtn.1
Non Version Run Y
Inputter.1 3896_BALA2__OFS_BROWSERTC
Date Time.1 04 MAR 20 17:03 04 MAR 20 17:03
Authoriser 3896_BALA2_OFS_BROWSERTC
Co Code GB0010001 Model Bank
Dept Code 7 Treasury Supervisor
Auditor Code
Audit Date Time
Step5:
Input an FT using your version with TRANSACTION.TYPE is equal to “OT” and commit the record.
Step6:
Confirm the result by viewing the percentage of charges waived for your FT transaction.
Scenario3:

Write a PRE.BATCH. ROUT and attach in SPF this routine should check for all INAU or INA2
transactions across all Transaction applications and create a report in &SAVEDLISTS&. Also
it should check if there are USER´s still logged in T24 by checking F.OS.TOKEN and create a
report.

Case:

To write a PRE.BATCH. ROUT and attach in SPF this routine should check for all INAU or INA2
transactions across all Transaction applications and create a report in &SAVEDLISTS&. Also create
another report by checking if there are USER´s still logged in T24 by checking F.OS.TOKEN.

Result:

A “PRE.BATCH. ROUT” to check for all INAU or INA2 transactions across all Transaction applications and
to create a report in &SAVEDLISTS& with another report to check if there are USER´s still logged in T24 by
using F.OS.TOKEN is executed and verified.

Observation:

F.OS.TOKEN is an application which will contain all the users list who are logged in T24.This application will
remove the user id from that if the user is logged out or user reaches timeout minutes.

Detail Steps:

Step1:
Write your “PRE.BATCH.ROUT” to check for all INAU or INA2 transactions across all Transaction
applications and create a report in &SAVEDLISTS&.
$PACKAGE EB.PT04BALABHARATHI
SUBROUTINE PT04.SPF.PRE.BATCH.RTN.GENERATE.REPORTS
*-----------------------------------------------------------------------------
$USING EB.SystemTables
$USING EB.API
$USING EB.DataAccess
$USING ST.ChqSubmit
$USING TT.Contract
$USING FT.Contract
$USING EB.Security
*-----------------------------------------------------------------------------
GOSUB OPEN.FILE
GOSUB INITIALIZATION
GOSUB INAU.TXN.REPORT.PROCESS
GOSUB ACTIVE.USERS.REPORT.PROCESS
GOSUB WRITE.FILE
RETURN
*-----------------------------------------------------------------------------
OPEN.FILE:
FN.CHEQUE.COLLECTION = "F.CHEQUE.COLLECTION"
FV.CHEQUE.COLLECTION = ""
EB.DataAccess.Opf(FN.CHEQUE.COLLECTION,FV.CHEQUE.COLLECTION)
FN.TELLER = "F.TELLER"
FV.TELLER = ""
EB.DataAccess.Opf(FN.TELLER,FV.TELLER)
FN.FUNDS.TRANSFER = "F.FUNDS.TRANSFER"
FV.FUNDS.TRANSFER = ""
EB.DataAccess.Opf(FN.FUNDS.TRANSFER,FV.FUNDS.TRANSFER)
FN.OS.TOKEN = "F.OS.TOKEN"
FV.OS.TOKEN = ""
EB.DataAccess.Opf(FN.OS.TOKEN,FV.OS.TOKEN)
FN.USER = "F.USER"
FV.USER = ""
EB.DataAccess.Opf(FN.USER,FV.USER)
RETURN
*-----------------------------------------------------------------------------
INITIALIZATION:
SEL.CHEQUE.COLLECTION = "" ; S.CHEQUE.COLLECTION.LIST = "" ;
S.CHEQUE.COLLECTION.COUNT = "" ; S.CHEQUE.COLLECTION.ERR = "" ;
S.CHEQUE.COLLECTION.POS = ""
R.CHEQUE.COLLECTION = "" ; R.CHEQUE.COLLECTION.ERR = ""
R.TELLER = "" ; R.TELLER.ERR = ""
R.FUNDS.TRANSFER = "" ; R.FUNDS.TRANSFER.ERR = ""
SEL.OS.TOKEN = "" ; S.OS.TOKEN.LIST = "" ; S.OS.TOKEN.COUNT = "" ;
S.OS.TOKEN.ERR = "" ; S.OS.TOKEN.POS = ""
R.OS.TOKEN = "" ; R.OS.TOKEN.ERR = ""
R.USER = "" ; R.USER.ERR = ""
Y.FILE.DIR = "./&SAVEDLISTS&"
Y.REPORT.FILENAME = ""
RETURN
*-----------------------------------------------------------------------------
INAU.TXN.REPORT.PROCESS:
* CHEQUE.COLLECTION application falls under OC category for all transactions.
SEL.CHEQUE.COLLECTION = "SELECT ":FN.CHEQUE.COLLECTION:" WITH TXN.ID LK TT...
FT..."
EB.DataAccess.Readlist(SEL.CHEQUE.COLLECTION,S.CHEQUE.COLLECTION.LIST,"",
S.CHEQUE.COLLECTION.COUNT,S.CHEQUE.COLLECTION.ERR)
LOOP
REMOVE CHEQUE.COLLECTION.ID FROM S.CHEQUE.COLLECTION.LIST SETTING
S.CHEQUE.COLLECTION.POS
WHILE CHEQUE.COLLECTION.ID : S.CHEQUE.COLLECTION.POS DO
EB.DataAccess.FRead(FN.CHEQUE.COLLECTION,CHEQUE.COLLECTION.ID,
R.CHEQUE.COLLECTION,FV.CHEQUE.COLLECTION,R.CHEQUE.COLLECTION.ERR)
CHEQUE.COLLECTION.TXN.ID =
R.CHEQUE.COLLECTION<ST.ChqSubmit.ChequeCollection.ChqColTxnId>
TXN.TYPE = DQUOTE(LEFT(CHEQUE.COLLECTION.TXN.ID,2))
IF TXN.TYPE = "TT" THEN

EB.DataAccess.FRead(FN.TELLER,CHEQUE.COLLECTION.TXN.ID,R.TELLER,FV.TELLER,R.TELLER.ERR)
TELLER.RECORD.STATUS = R.TELLER<TT.Contract.Teller.TeRecordStatus>
IF (TELLER.RECORD.STATUS EQ "INAU") OR (TELLER.RECORD.STATUS EQ "INA2") OR
(TELLER.RECORD.STATUS EQ "IHLD") THEN
TELLER.ACCOUNT.ONE = R.TELLER<TT.Contract.Teller.TeAccountOne>
TELLER.CCY.ONE = R.TELLER<TT.Contract.Teller.TeCurrencyOne>
TELLER.AMT.LCY.ONE = R.TELLER<TT.Contract.Teller.TeAmountLocalOne>
TELLER.ACCOUNT.TWO = R.TELLER<TT.Contract.Teller.TeAccountTwo>
TELLER.CCY.TWO = R.TELLER<TT.Contract.Teller.TeCurrencyTwo>
TELLER.VALUE.DATE.ONE = R.TELLER<TT.Contract.Teller.TeValueDateOne>
TELLER.TXN.CODE = R.TELLER<TT.Contract.Teller.TeTransactionCode>
TELLER.DATE.TIME = R.TELLER<TT.Contract.Teller.TeDateTime>
Y.FINAL.ARRAY<-1> =
CHEQUE.COLLECTION.TXN.ID:",":TELLER.ACCOUNT.ONE:",":TELLER.CCY.ONE:
",":TELLER.AMT.LCY.ONE:",":TELLER.ACCOUNT.TWO:",":TELLER.CCY.TWO:
",":TELLER.VALUE.DATE.ONE:",":TELLER.TXN.CODE:",":TELLER.RECORD.STATUS:
",":TELLER.DATE.TIME
END
END
IF TXN.TYPE = "FT" THEN

EB.DataAccess.FRead(FN.FUNDS.TRANSFER,CHEQUE.COLLECTION.TXN.ID,R.FUNDS.TRANSFER,
FV.FUNDS.TRANSFER,R.FUNDS.TRANSFER.ERR)
FUNDS.TRANSFER.RECORD.STATUS =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.RecordStatus>
IF (FUNDS.TRANSFER.RECORD.STATUS EQ "INAU") OR
(FUNDS.TRANSFER.RECORD.STATUS
EQ "INA2") OR (FUNDS.TRANSFER.RECORD.STATUS EQ "IHLD") THEN
FUNDS.TRANSFER.DB.AC.NO =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.DebitAcctNo>
FUNDS.TRANSFER.DB.AC.CCY =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.DebitCurrency>
FUNDS.TRANSFER.DB.AMT =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.DebitAmount>
FUNDS.TRANSFER.CR.AC.NO =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.CreditAcctNo>
FUNDS.TRANSFER.CR.AC.CCY =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.CreditCurrency>
FUNDS.TRANSFER.VALUE.DATE =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.DebitValueDate>
FUNDS.TRANSFER.TXN.TYPE =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.TransactionType>
FUNDS.TRANSFER.DATE.TIME =
R.FUNDS.TRANSFER<FT.Contract.FundsTransfer.DateTime>
Y.FINAL.ARRAY<-1> =
CHEQUE.COLLECTION.TXN.ID:",":FUNDS.TRANSFER.DB.AC.NO:",":FUNDS.TRANSFER.DB.AC.CCY:
",":FUNDS.TRANSFER.DB.AMT:",":FUNDS.TRANSFER.CR.AC.NO:",":FUNDS.TRANSFER.CR.AC.CCY:
",":FUNDS.TRANSFER.VALUE.DATE:",":FUNDS.TRANSFER.RECORD.STATUS:
",":FUNDS.TRANSFER.DATE.TIME
END
END
REPEAT
Y.REPORT.FILENAME = "AllINAUTxnListWithTxnTypeEqOC.txt"
GOSUB WRITE.FILE
RETURN
*-----------------------------------------------------------------------------
ACTIVE.USERS.REPORT.PROCESS:
SEL.OS.TOKEN = "SELECT ":FN.OS.TOKEN
EB.DataAccess.Readlist(SEL.OS.TOKEN,S.OS.TOKEN.LIST,"",S.OS.TOKEN.COUNT,
S.OS.TOKEN.ERR)
LOOP
REMOVE OS.TOKEN.ID FROM S.OS.TOKEN.LIST SETTING S.OS.TOKEN.POS
WHILE OS.TOKEN.ID : S.OS.TOKEN.POS DO
EB.DataAccess.FRead(FN.OS.TOKEN,OS.TOKEN.ID,R.OS.TOKEN,FV.OS.TOKEN,
R.OS.TOKEN.ERR)
OS.TOKEN.USER.ID = R.OS.TOKEN<EB.Security.OsToken.OsTkUserId>
EB.DataAccess.FRead(FN.USER,OS.TOKEN.USER.ID,R.USER,FV.USER,R.USER.ERR)
USER.LOGIN.STATUS = R.USER<EB.Security.User.UseLoginStatus>
IF USER.LOGIN.STATUS EQ "ACTIVE" THEN
USER.USERNAME = R.USER<EB.Security.User.UseUserName>
USER.CLASSIFICATION = R.USER<EB.Security.User.UseClassification>
USER.COMPANY.CODE = R.USER<EB.Security.User.UseCompanyCode>
Y.FINAL.ARRAY<-1> =
OS.TOKEN.USER.ID:",":USER.LOGIN.STATUS:",":USER.USERNAME:",":USER.CLASSIFICATION:
",":USER.COMPANY.CODE
END
REPEAT
Y.REPORT.FILENAME = "ActiveUsersList.txt"
GOSUB WRITE.FILE
RETURN
*-----------------------------------------------------------------------------
WRITE.FILE:
OPENSEQ Y.FILE.DIR,Y.REPORT.FILENAME TO Y.SEQ ELSE
CREATE Y.SEQ ELSE
CRT"Cannot open file"
STOP
END
END
CRT"File Successfully opened"
Y.CRLF = CHAR(013):CHAR(010)
CHANGE @FM TO Y.CRLF IN Y.FINAL.ARRAY
WRITESEQ Y.FINAL.ARRAY APPEND TO Y.SEQ ELSE
CRT "Cannot write file"
END
CLOSESEQ Y.SEQ
RETURN
*-----------------------------------------------------------------------------
END

Step3:
Create a PGM.FILE entry for your routine.
PGM.FILE........... PT04.INAU.INA2.TXN.REPORT
---------------------------------
1 TYPE.............. S
2. 1 GB SCREEN.TITLE
3 ADDITIONAL.INFO... @PT04.INAU.INA2.TXN.REPORT
4. 1 BATCH.JOB......
5 PRODUCT........... EB
Step4:
Attach your routine to the SPF in “PRE.BATCH.ROUT” field.

Step5:
Pre batch routine field will allow user to add subroutine or enquiry or API call and it will run or create
reports at pre batch stage.
Step6:
Before Cob starts, this routine will get trigger and the reports for all the transactions which are in
INAU and INA2 status records and for the users logged in t24 will be created according to the given
condition.
Step7:
Confirm the result by checking whether the reports are created under the respective directories.
Scenario4:

Write a routine for CHECKDIGIT calculation. Account number format should be


CUSTOMER.NUMBER + SEQ.NO + CURRENCY.CODE + BRANCH code and in total it
should be 16 Digits in length. The routine should validate the format and give error messages
accordingly. The customer account number should be only in numeric.
SEQ.NO - Should be calculated based on the number of accounts exists for the CUSTOMER in
total ie., SEQ.NO = TOTAL.NUMBER.ACCOUNTS + 1. Maximum 99 accounts per customer
allowed.
CURRENCY.CODE - Should be 2 digits numeric code.
BRANCH code - should be 3 digits taken from INTERCO.PARAMETER setup or from
COMPANY table.

Case:

To write an “Id Routine” for CHECKDIGIT calculation for ACCOUNT.ID in ACCOUNT


application.

Result:

An “Id Routine” for CHECKDIGIT calculation for ACCOUNT.ID in ACCOUNT application is executed and verified.

Observation:

The routine will be triggered for account application since we are attaching it in VERSION.CONTROL as “Id
Routine” and the validation for the ACCOUNT.ID will be done by the routine.

Detail Steps:

Step1:
Write your “Id Routine” for CHECKDIGIT calculation for ACCOUNT.ID in ACCOUNT application.
$PACKAGE EB.PT04BALABHARATHI
SUBROUTINE PT04.ACCOUNT.ID.CHKDGT.VALIDATE
*----------------------------------------------------------------------------
$USING AC.AccountOpening
$USING EB.DataAccess
$USING ST.CurrencyConfig
$USING ST.CompanyCreation
*----------------------------------------------------------------------------
FN.ACCOUNT ='F.ACCOUNT'
FV.ACCOUNT =''
EB.DataAccess.Opf(FN.ACCOUNT,FV.ACCOUNT)
FN.CUSTOMER = "F.CUSTOMER"
FV.CUSTOMER = ""
EB.DataAccess.Opf(FN.CUSTOMER,FV.CUSTOMER)
FN.COMPANY = "F.COMPANY"
FV.COMPANY = ""
EB.DataAccess.Opf(FN.COMPANY,FV.COMPANY)
FN.CUSTOMER.ACCOUNT = "F.CUSTOMER.ACCOUNT"
FV.CUSTOMER.ACCOUNT = ""
EB.DataAccess.Opf(FN.CUSTOMER.ACCOUNT,FV.CUSTOMER.ACCOUNT)
FN.CCY = "F.CURRENCY"
FV.CCY = ""
EB.DataAccess.Opf(FN.CCY,FV.CCY)
*----------------------------------------------------------------------------
SEL.LIST = "" ; S.ERR = "" ; S.COUNT = "" ; CUSTMER.ID = ""
SEL.CMD="SELECT ": FN.CUSTOMER
EB.DataAccess.Readlist(SEL.CMD,S.LIST ,"",S.COUNT,S.ERR)
LOOP
REMOVE CUSTMER.ID FROM S.LIST SETTING S.POS
WHILE CUSTOMER.ID : S.POS DO
EB.DataAccess.FRead(FN.CUSTOMER,CUSTOMER.ID,R.CUSTOMER,FV.CUSTOMER,
CUSTOMER.ERR)

EB.DataAccess.FRead(FN.CUSTOMER.ACCOUNT,CUSTMER.ID,R.CUSTOMER.ACCOUNT,
FV.CUSTOMER.ACCOUNT,CUSTOMER.ACCOUNT.ERR)
ACCOUNT.COUNT = DCOUNT(R.CUSTOMER.ACCOUNT,@FM)
IF ACCOUNT.COUNT LE "99" THEN
SEQ.NO = ACCOUNT.COUNT+1
END
FOR I=1 TO ACCOUNT.COUNT
ACCOUNT.NO = R.CUSTOMER.ACCOUNT<I>
R.ACCOUNT = "" ; ACCOUNT.ERR = ""
EB.DataAccess.FRead(FN.ACCOUNT,ACCOUNT.NO,R.ACCOUNT,FV.ACCOUNT,ACCOUNT.ERR)
ACCT.CURRENCY=R.ACCOUNT<AC.AccountOpening.Account.Currency>
ACCT.CO.CODE=R.ACCOUNT<AC.AccountOpening.Account.CoCode>

EB.DataAccess.FRead(FN.CCY,ACCT.CURRENCY,R.CCY,FV.CCY,CCY.ERR)

CCY.CODE=R.CCY<ST.CurrencyConfig.Currency.EbCurNumericCcyCode>
CURRENCY.CODE = CCY.CODE[1,2]

EB.DataAccess.FRead(FN.COMPANY,ACCT.CO.CODE,R.COMPANY,FV.COMPANY,
COMPANY.ERR)

INTERCO.PARA=R.COMPANY<ST.CompanyCreation.IntercoParameter.IcpBranchCode>
DIGIT = "00"
BRANCH.CODE = INTERCO.PARA:DIGIT
ACCOUNT.ID.FRMT =
CUSTMER.ID:SEQ.NO:CURRENCY.CODE:BRANCH.CODE
ACCOUNT.ID = EB.SystemTables.getComi()
Y.NUMERIC = ISDIGIT(ACCOUNT.ID)
IF LEN(ACCOUNT.ID) NE "16" AND ACCOUNT.ID.FRMT NE ACCOUNT.ID
AND Y.NUMERIC NE "0" THEN
EB.SystemTables.setE("Account ID should contain only 16 digit
numbers")
END
NEXT I
REPEAT
*----------------------------------------------------------------------------
RETURN
END
Step3:
Create a EB.API entry for your routine.
EB.API........... PT04.ACCOUNT.ID.CHKDGT.VALIDATE
---------------------------------
1. 1 GB DESCRIPTION.
2 PROTECTION.LEVEL.. NONE
3 SOURCE.TYPE....... BASIC
Step4:
Attach your routine to your VERSION.CONTROL in “Input Rtn” field.
VERSION.CONTROL...... ACCOUNT
-----------------------------------------------------
Auto Field Name.1
Auto Old Cont.1
Auto Field Rtn.1
Field Name.1
Validation Rtn.1
Input Rtn.1 @PT04.ACCOUNT.ID.CHKDGT.VALIDATE
Auth Rtn.1
Id Rtn.1
Check Rec Rtn.1
After Unau Rtn.1
Before Auth Rtn.1
Non Version Run Y
Inputter.1 3896_BALA2__OFS_BROWSERTC
Date Time.1 04 MAR 20 17:03 04 MAR 20 17:03
Authoriser 3896_BALA2_OFS_BROWSERTC
Co Code GB0010001 Model Bank
Dept Code 7 Treasury Supervisor
Auditor Code
Audit Date Time
Step5:
Try to input an ACCOUNT by inputting an account id.
Step6:
Confirm the result by viewing the error message thrown if the id doesn’t match with the format as
mentioned in your routine.
Scenario5:

Create CHECK.REC.RTN for all ACCOUNT versions and populate the following fields based
on the CUSTOMER. Since, ACCOUNT record will have CUSTOMER number, read
CUSTOMER and populate ADDRESSS, NAME, CUSTOMER.NO and other information
available from CUSTOMER to ACCOUNT screen.

Case:

To write an “CHECK.REC.RTN” for all ACCOUNT versions and populate the following fields based
on the CUSTOMER.

Result:

A “CHECK.REC.RTN” for all ACCOUNT versions to populate the fields based on the CUSTOMER is executed and
verified.

Observation:

The routine will be triggered for account application since we are attaching it in VERSION.CONTROL as “Id
Routine” and the validation for the ACCOUNT.ID will be done by the routine.

Detail Steps:

Step1:
Write your “Id Routine” for CHECKDIGIT calculation for ACCOUNT.ID in ACCOUNT application.
$PACKAGE EB.PT04BALABHARATHI
SUBROUTINE PT04.POPULATE.CSINFO.TO.AC.LOCFLDS
*----------------------------------------------------------------------------
$USING EB.SystemTables
$USING EB.API
$USING EB.DataAccess
$USING ST.Customer
$USING AC.AccountOpening
$USING EB.Updates
*----------------------------------------------------------------------------
FN.ACCOUNT ='F.ACCOUNT'
FV.ACCOUNT =''
EB.DataAccess.Opf(FN.ACCOUNT,FV.ACCOUNT)

FN.CUSTOMER = "F.CUSTOMER"
FV.CUSTOMER = ""
EB.DataAccess.Opf(FN.CUSTOMER,FV.CUSTOMER)

LRF.POS = ""
*----------------------------------------------------------------------------
ACCOUNT.ID = EB.SystemTables.getIdNew()
CUSTOMER.ID = EB.SystemTables.getRNew(AC.AccountOpening.Account.Customer)
EB.DataAccess.FRead(FN.CUSTOMER,CUSTOMER.ID,R.CUSTOMER,FV.CUSTOMER,
R.CUSTOMER.ERR)
CUSTOMER.SECTOR = R.CUSTOMER<ST.Customer.Customer.EbCusSector>
CUSTOMER.MNEMONIC = R.CUSTOMER<ST.Customer.Customer.EbCusMnemonic>
CUSTOMER.ADDRESS = R.CUSTOMER<ST.Customer.Customer.EbAddress>
CUSTOMER.LANG.CODE = R.CUSTOMER<ST.Customer.Customer.EbCusLanguage>
APP.NAME = "ACCOUNT"
LOC.FIELDS = "CUSTOMER.ADDRESS" :@VM : "CUSTOMER.SECTOR" :@VM :
"CUSTOMER.LANG.CODE"
EB.Updates.MultiGetLocRef(APP.NAME,LOC.FIELDS,LRF.POS)
CUSTOMER.ADDRESS.POS = LRF.POS<1,1>
CUSTOMER.SECTOR.POS = LRF.POS<1,2>
CUSTOMER.LANG.CODE.POS = LRF.POS<1,3>
R.ARRAY<AC.AccountOpening.Account.LocalRef,CUSTOMER.ADDRESS.POS> =
CUSTOMER.ADDRESS
R.ARRAY<AC.AccountOpening.Account.LocalRef,CUSTOMER.SECTOR.POS> =
CUSTOMER.SECTOR
R.ARRAY<AC.AccountOpening.Account.LocalRef,CUSTOMER.LANG.CODE.POS> =
CUSTOMER.LANG.CODE
EB.SystemTables.setRNew(AC.AccountOpening.Account.LocalRef) = R.ARRAY
EB.SystemTables.setRNew(AC.AccountOpening.Account.Mnemonic)=
CUSTOMER.MNEMONIC
*----------------------------------------------------------------------------
RETURN
END

Step3:
Create a EB.API entry for your routine.
EB.API........... PT04.POPULATE.CSINFO.TO.AC.LOCFLDS
---------------------------------
1. 1 GB DESCRIPTION.
2 PROTECTION.LEVEL.. NONE
3 SOURCE.TYPE....... BASIC
Step4:
Attach your routine to your VERSION.CONTROL in “Input Rtn” field.
VERSION.CONTROL...... ACCOUNT
-----------------------------------------------------
Auto Field Name.1
Auto Old Cont.1
Auto Field Rtn.1
Field Name.1
Validation Rtn.1
Input Rtn.1
Auth Rtn.1
Id Rtn.1
Check Rec Rtn.1 @PT04.POPULATE.CSINFO.TO.AC.LOCFLDS
After Unau Rtn.1
Before Auth Rtn.1
Non Version Run Y
Inputter.1 3896_BALA2__OFS_BROWSERTC
Date Time.1 04 MAR 20 17:03 04 MAR 20 17:03
Authoriser 3896_BALA2_OFS_BROWSERTC
Co Code GB0010001 Model Bank
Dept Code 7 Treasury Supervisor
Auditor Code
Audit Date Time
Step5:
Try to input an ACCOUNT by inputting an account id.
Step6:
Confirm the result by viewing the error message thrown if the id doesn’t match with the format as
mentioned in your routine.
Scenario8:

Create a BROWSER.TOOLBAR named say hello and add it to T24 Browser Screen (in all
transaction screens) which should call an external weather web service and display in browser
screen. Use java script option to achieve this and java script should be placed under
…/scripts/custom.js..

Case:

To create a BROWSER.TOOLBAR named say hello and add it to T24 Browser Screen (in all
transaction screens) which should call an external weather web service and display in browser screen.

Result:

A BROWSER.TOOLBAR named say hello to call an external weather web service and display in browser screen
is executed and verified.

Observation:

A java script code to call an external weather web service written is added to BROWSER.TOOL and then the
BROWSER.TOOL record id is given in BROWSER.TOOLBAR and then BROWSER.TOOLBAR record id is added to
HELPTEXT.MAINMENU in order to display it in browser screen.

Detail Steps:

Step1:
Write your “java script program” to call an external weather service.
PT04.WEATHER.SERVICE.PAGE.js
------------------------------------------------------------------------------

window.open('https://www.bbc.com/weather', '_blank');

Step2:
Copy and paste your java script file created in the location
jboss/standalone/deployments/BrowserWeb.war/scripts/.
Step3:
Attach your java script program to BROWSER.TOOL.
BROWSER.TOOL........... PT04.EXT.WEATHER.SERVICE
---------------------------------
1 TYPE. JAVASCRIPT
2 ITEM.. doDeal(‘PT04.WEATHER.SERVICE.PAGE’)
Step4:
Add your BROWSER.TOOL record created to BROWSER.TOOLBAR.
BROWSER.TOOLBAR...... HELLO
-----------------------------------------------------
1 TOOL.ID PT04.EXT.WEATHER.SERVICE
Step5:
Add your BROWSER.TOOLBAR created to HELPTEXT.MAINMENU.
HELPTEXT.MAINMENU...... WEATHER.SERVICE
-----------------------------------------------------
1 BROWSER.TOOLBAR HELLO
Step6:
Confirm the result on viewing the external weather web service page by clicking on the
HELPTEXT.MAINMENU created.
Scenario9:

If any FT record exists in INAU and if the CREDIT.AMOUNT > 1000 of local currency, then
the during the authorisation, it show throw error 'Cannot be authorised - Amount > 1000
':Local currency..

Case:

To write an “AUTH RTN” to throw an error while authorizing the INAU records in FT, if the
CREDIT.AMOUNT > 1000 of local currency.

Result:

An “AUTH RTN” to throw an error while authorizing the INAU records in FT, if the CREDIT.AMOUNT > 1000 of
local currency is executed and verified.

Observation:

The routine will be triggered while authorizing the INAU records in FT, and error will be thrown if the
CREDIT.AMOUNT>1000 of local currency.

Detail Steps:

Step1:
Write your “AUTH RTN” to throw an error while authorizing the INAU records in FT when the
CREDIT.AMOUNT > 1000 of local currency.
$PACKAGE EB.PT04BALABHARATHI
SUBROUTINE PT04.AUTH.FT.INAU.ERR.IF.CRAMTGT1000
*-----------------------------------------------------------------------------
$USING EB.SystemTables
$USING EB.API
$USING EB.DataAccess
$USING FT.Contract
$USING EB.ErrorProcessing
*-----------------------------------------------------------------------------
FN.FUNDS.TRANSFER = "F.FUNDS.TRANSFER"
FV.FUNDS.TRANSFER = ""
EB.DataAccess.Opf(FN.FUNDS.TRANSFER, FV.FUNDS.TRANSFER)
*-----------------------------------------------------------------------------
FUNDS.TRANSFER.ID = EB.SystemTables.getIdNew()
FT.CREDIT.AMOUNT =
EB.SystemTables.getRNew(FT.Contract.FundsTransfer.LocAmtCredited)
IF FT.CREDIT.AMOUNT GT 1000 THEN
ERROR.TEXT = " Error-PT04 - Cannot be authorized - CREDIT.AMOUNT>1000"
EB.SystemTables.setEtext(ERROR.TEXT)
EB.ErrorProcessing.StoreEndError()
END
*-----------------------------------------------------------------------------
RETURN
END

Step2:
Create a EB.API entry for your routine.
EB.API........... PT04.AUTH.FT.INAU.ERR.IF.CRAMTGT1000
---------------------------------
1. 1 GB DESCRIPTION.
2 PROTECTION.LEVEL.. NONE
3 SOURCE.TYPE....... BASIC
Step3:
Attach your routine to your VERSION.CONTROL in “Input Rtn” field.
VERSION.CONTROL...... FUNDS.TRANSFER
-----------------------------------------------------
Auto Field Name.1
Auto Old Cont.1
Auto Field Rtn.1
Field Name.1
Validation Rtn.1
Input Rtn.1
Auth Rtn.1
Id Rtn.1
Check Rec Rtn.1 @PT04.AUTH.FT.INAU.ERR.IF.CRAMTGT1000
After Unau Rtn.1
Before Auth Rtn.1
Non Version Run Y
Inputter.1 3896_BALA2__OFS_BROWSERTC
Date Time.1 04 MAR 20 17:03 04 MAR 20 17:03
Authoriser 3896_BALA2_OFS_BROWSERTC
Co Code GB0010001 Model Bank
Dept Code 7 Treasury Supervisor
Auditor Code
Audit Date Time
Step4:
Try to authorize a FUNDS.TRANSFER transaction which is in INAU with CREDIT.AMOUNT greater than
1000 using any FUNDS.TRANSFER version.
Step5:
Confirm the result by viewing the error message thrown if the id doesn’t match with the format as
mentioned in your routine.

-----------------------------------------------------END – OF – REPORT------------------------------------------------

You might also like