Enquiry 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 HEADQUARTERS SA
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 extent possible under applicable law.”
Information in this document is subject to change without notice
Objectives
After completing this learning unit, you will be able to:
Explain different types of enquiry routines that can be attached to an
enquiry
Identify the stages where the enquiry routines would get executed
Create Build and Conversion Routines
Slide 2
What is an Enquiry?
An enquiry is a query to T24
It is a ‘SELECT’ executed to fetch data from T24
Created using the ENQUIRY application
Data can be displayed in user defined format
Slide 3
Working of an Enquiry
Picks up the application from the ENQUIRY
Refers to the Standard Selection and creates a list of
IDs that satisfy the fixed selection
Applies the Dynamic Selection and rebuilds the list of
IDs that satisfy the condition (s)
Picks up each ID from the list and reads the record
from the database
Finally displays the required data (field by field)
Slide 4
Why Enquiry Subroutines?
Subroutines enable users to read or write onto single or multiple files
Subroutines are executed from T24
Subroutines add more functionality to enquiries
Subroutines can be attached to manipulate data before displaying
Slide 5
Enquiry Routines
ENQUIRY ROUTINES
BUILD CONVERSION
ROUTINES ROUTINES
Slide 6
Build Routine
Build Routine is used to manipulate the ‘Selection Criteria Box’
Refers the Standard Selection and creates a list of
IDs which satisfy the fixed selection
BUILD
ROUTINES
Applies the Dynamic Selection and builds a list of IDs
that satisfy the conditions
The Build Routine is attached to the field BUILD.ROUTINE in the
ENQUIRY record
Slide 7
Build Routine
Build Routine must have an argument (dynamic array) passed
The dynamic array is represented as ENQ.DATA<column,row>
Enquiry Name
ENQ.DATA<1>
Field Name
ENQ.DATA<2>
Operands
ENQ.DATA<3>
Actual Value
ENQ.DATA<4>
Slide 8
Task
Create an enquiry that will display Customer Id, the Account Id and the
respective working balance after accepting the category from the user.
For category 1001 - Balance should be in the range 0 and 49999
For category 6001 - Balance should be in the range 50000 and 100000
For category greater than 7000 - Balance should be in the range
100000 and 500000
Slide 9
Step 1 – Subroutine
SUBROUTINE BUILD.ROUTINE(ENQ.DATA)
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
LOCATE 'CATEGORY' IN ENQ.DATA<2,1> SETTING Y.POS ELSE NULL
Y.CAT=ENQ.DATA<4,Y.POS>
LOCATE 'WORKING.BALANCE' IN ENQ.DATA<2,1> SETTING BAL.POS ELSE
NULL
Slide 10
Step 1 – Subroutine
ENQ.DATA<2,BAL.POS>='WORKING.BALANCE‘
ENQ.DATA<3,BAL.POS>= 'RG'
IF Y.CAT=1001 THEN ENQ.DATA<4,BAL.POS>='0 49999'
IF Y.CAT=6001 THEN ENQ.DATA<4,BAL.POS>='50000 100000'
IF Y.CAT>7000 THEN ENQ.DATA<4,BAL.POS>='100000 500000'
RETURN
END
Slide 11
Step 2 – Enquiry
Slide 12
Output
Slide 13
Debugger mode
Slide 14
Conversion Routine
CONVERSION Routine help us to manipulate data in a field prior to
display
Picks up each ID from the ID list and for each ID
picks up the fields specified in the Enquiry (field
by field)
CONVERSION
ROUTINES
Finally displays the data(field by field)
The CONVERSION Routine is attached to the field ‘CONVERSION’ in the
ENQUIRY record
Slide 15
Environment variables
I_ENQUIRY.COMMON is the insert file that contain common variables
specific to enquiries
O.DATA is a common variable that holds the last extracted value
R.RECORD holds the record pertaining to the current ID that has been
extracted
Slide 16
Task
Create an enquiry that will list the LD contract numbers, and their
respective loan amounts. If the loan amount is in foreign currency, they
have to be converted to local currency and then displayed.
The output should have the following columns - ID, CCY, AMT,
AMT.LCY
Slide 17
Step 1 – Subroutine
SUBROUTINE CONV.ROUTINE
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
$INSERT I_F.LD.LOANS.AND.DEPOSITS
$INSERT I_F.CURRENCY
GOSUB INIT
GOSUB PROCESS
RETURN
INIT:
FN.CUR = 'F.CURRENCY'
F.CUR = ''
Slide 18
STEP 1 – SUBROUTINE
Y.LD.CURR = R.RECORD<LD.CURRENCY>
R.CUR.REC = ''
CALL OPF(FN.CUR,F.CUR)
RETURN
PROCESS:
IF Y.LD.CURR NE LCCY THEN
CALL F.READ(FN.CUR,Y.LD.CURR,R.CUR.REC,F.CUR,LD.ERR1)
O.DATA = R.CUR.REC<EB.CUR.MID.REVAL.RATE,1> * O.DATA
END
RETURN
END
Slide 19
STEP 2 – Create the ENQUIRY
Slide 20
OUTPUT
Slide 21
Debugger Mode
Slide 22
QUIZ
QUIZ
Slide 23
Summary
In this learning unit/course, you learnt about the enquiry routines in
T24
You will now be able to:
Explain different types of enquiry routines that can be attached to an
enquiry
Identify the stages where the enquiry routines would get executed
Create Build and Conversion Routines
Slide 24
Thank You
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 HEADQUARTERS SA
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 extent possible under applicable law.”
Information in this document is subject to change without notice