You are on page 1of 25

Creating NOFILE Enquiries

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

1
Agenda

‰ Understanding why a NOFILE enquiry is to be created


‰ Steps to create a NOFILE enquiry
‰ NOFILE Enquiry – An example
‰ Analysis of the example
‰ Algorithm for the routine
‰ Writing the routine
‰ Setting up the STANDARD SELECTION record
‰ Setting up the ENQUIRY application
‰ Executing the enquiry

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

2
Prerequisites

‰ Knowledge on the working of the ENQUIRY application

‰ Info BASIC programming skills

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

3
Why NOFILE Enquiry ?

‰ When information is required for more than one T24 application


(which cannot be linked in the ENQUIRY application)

‰ When complex calculations and conditions are required and


involves more than one T24 application
No connection between Files – cannot be linked in ENQUIRY
Complex calculations that are not supported by the ENQUIRY application

File 1 File 2 File 3 File 4

Routine

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

4
Setting up the ENQUIRY Application
ENQUIRY : FILE.NAME Field - Mandatory

This case - Requires more than one Application

Use logical file name

Define it in STANDARD.SELECTION

No FILE.CONTROL – Validation Error in SS


Start STANDARD.SELECTION ID with NOFILE
(Will not check for FILE.CONTROL record)

Now use in Enquiry FILE.NAME

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

5
Setting up the ENQUIRY Application

STANDARD.SELECTION record requires a field

Create a logical field

How does the field get data?

Write a routine and attach it to the logical field

User need selection fields ?

Define “S”election type fields

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

6
Setting up a NOFILE Enquiry

Components of a NOFILE Enquiry are

‰ Info BASIC routine

‰ STANDARD.SELECTION record

‰ ENQUIRY record

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

7
NOFILE Enquiry Example

A bank requires a report in the following format.

Customer Report
Date : <Today’s date> User : <User Id of the user executing the enquiry>
Customer Number : <Customer ID>
Account No Total Fwd Cr Total Fwd Dr Total Cr Int Total Dr Int
XXXXXX XXXXXX XXXXXX XXXXXX XXXXXX
XXXXXX XXXXXX XXXXXX XXXXXX XXXXXX
XXXXXX XXXXXX XXXXXX XXXXXX XXXXXX

A customer, at any point in time, may want to know the total of his
‰ Forward credit movements (Money that is due to the customer at a future
date)
‰ Forward debit movements (Money that the customer is liable to pay at a
future date)
‰ Accrued interest that is due to the customer (total)
‰ Accrued interest that the customer is liable to pay (total)

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

8
Files To Be Used

‰ CUSTOMER.ACCOUNT – To obtain the list of accounts for a


particular customer
‰ ACCT.ENT.FWD – To obtain the forward STMT.ENTRY Ids for an
account of a customer
‰ STMT.ENTRY – To obtain the details of the STMT.ENTRY record
‰ ACCR.ACCT.CR – To obtain accrued credit interest
‰ ACCR.ACCT.DR - To obtain accrued credit interest

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

9
Solution 1 - Algorithm

For the customer number supplied, extract record from CUSTOMER.ACCOUNT

AC1FMAC2FMAC3FMAC4

Read ACCT.ENT.FWD with the Account ID

Extract the next ID and process


FST1FMFST2FMFST3

Read STMT.ENTRY with the STMT.ENTRY ID

AcIdFMCoCodeFMLCYAmtFMTranCodeFMCusIDFM……………….

Extract the local currency amount and check if > than 0


If > 0 then Future Cr Mov += Future Cr Mov else
Future Dr Mov += Future Dr Mov All F STMT
entries have
been
processed

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

10
Solution 1 - Algorithm

Read the ACCR.ACCT.CR file with the Account ID

CrIntDateFMCrNoOfDaysFMCrIntRateFMCrIntAmtFMCrIntCategFM…..TotalInterest

Total Credit Interest += Total Interest

Read the ACCR.ACCT.DR file with the Account ID

PrFstDateFMPrLstDtFMDrIntDateFMDrNoOfDaysFM..TotalInterest

Total Debit Interest += Total Interest


Get back to
next account
Concatenate values in return parameter: Account ID,Tot
Fwd Dr,Tot Fwd Cr,Total Dr Int,Tot Cr Int

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

11
Routine for the NOFILE Enquiry

SUBROUTINE TRG.CUS.REPORT(AC.DET.ARR)

$INCLUDE GLOBUS.BP I_COMMON


$INCLUDE GLOBUS.BP I_EQUATE
$INCLUDE GLOBUS.BP I_F.ACCOUNT
$INCLUDE GLOBUS.BP I_F.CUSTOMER
$INCLUDE GLOBUS.BP I_F.CUSTOMER.ACCOUNT
$INCLUDE GLOBUS.BP I_F.STMT.ENTRY
$INCLUDE GLOBUS.BP I_F.ACCR.ACCT.CR
$INCLUDE GLOBUS.BP I_F.ACCR.ACCT.DR
$INCLUDE GLOBUS.BP I_ENQUIRY.COMMON

GOSUB INITIALISATION
GOSUB OPEN.FILES
GOSUB PROCESS

RETURN

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

12
Routine for the NOFILE Enquiry

*--------------*
INITIALISATION:
*--------------*

FN.CUSTOMER.ACCOUNT = 'F.CUSTOMER.ACCOUNT'
F.CUSTOMER.ACCOUNT = ''

FN.ACCT.ENT.FWD = 'F.ACCT.ENT.FWD'
F.ACCT.ENT.FWD = ''

FN.STMT.ENTRY = 'F.STMT.ENTRY'
F.STMT.ENTRY = ''

FN.ACCR.ACCT.CR = 'F.ACCR.ACCT.CR'
F.ACCR.ACCT.CR = ''

FN.ACCR.ACCT.DR = 'F.ACCR.ACCT.DR'
F.ACCR.ACCT.DR = ''

RETURN

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

13
Routine for the NOFILE Enquiry

*----------*
OPEN.FILES:
*----------*

CALL OPF(FN.CUSTOMER.ACCOUNT,F.CUSTOMER.ACCOUNT)
CALL OPF(FN.ACCT.ENT.FWD,F.ACCT.ENT.FWD)
CALL OPF(FN.ACCR.ACCT.CR,F.ACCR.ACCT.CR)
CALL OPF(FN.STMT.ENTRY,F.STMT.ENTRY)
CALL OPF(FN.ACCR.ACCT.DR,F.ACCR.ACCT.DR)

RETURN

*-------*
PROCESS:
*-------*

LOCATE "CUSTOMER.NO" IN D.FIELDS<1> SETTING CUS.POS THEN


CUSTOMER.NO = D.RANGE.AND.VALUE<CUS.POS>
END

CALL
F.READ(FN.CUSTOMER.ACCOUNT,CUSTOMER.NO,CUS.ACC.REC,F.CUSTOMER.ACCOUNT,CUS.ACC.R.ERR)

* D.LOGICAL.OPERANDS<CUS.POS> is used to get the operand

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

14
Routine for the NOFILE Enquiry

LOOP

REMOVE AC.ID FROM CUS.ACC.REC SETTING AC.POS

WHILE AC.ID:AC.POS

GOSUB CALC.ENT.FWD

GOSUB CALC.ACCR.INT

AC.DET.ARR<-1> = AC.ID:"*":CR.AMT:"*":DR.AMT:"*":CR.TOT.INT:"*":DR.TOT.INT

REPEAT

RETURN

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

15
Routine for the NOFILE Enquiry

*------------*
CALC.ENT.FWD:
*------------*

DR.AMT = '' ; CR.AMT = ''


CALL F.READ(FN.ACCT.ENT.FWD,AC.ID,ACCT.ENT.REC,F.ACCT.ENT.FWD,ACCT.ENT.R.ERR)

LOOP
REMOVE ACCT.ENT.ID FROM ACCT.ENT.REC SETTING ACCT.ENT.POS
WHILE ACCT.ENT.ID:ACCT.ENT.POS

CALL F.READ(FN.STMT.ENTRY,ACCT.ENT.ID,STMT.ENTRY.REC,F.STMT.ENTRY,STMT.ENTRY.R.ERR)

ACCT.ENT.AMT = STMT.ENTRY.REC<AC.STE.AMOUNT.LCY>

IF ACCT.ENT.AMT LT 0 THEN
DR.AMT += ABS(ACCT.ENT.AMT)
END ELSE
CR.AMT += ACCT.ENT.AMT

END

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

16
Routine for the NOFILE Enquiry

REPEAT

RETURN

*-------------*
CALC.ACCR.INT:
*-------------*

CR.TOT.INT = '' ; DR.TOT.INT = ''


CALL F.READ(FN.ACCR.ACCT.CR,AC.ID,AC.CR.REC,F.ACCR.ACCT.CR,ACCT.CR.R.ERR)

CR.TOT.INT = AC.CR.REC<IC.ACRCR.TOTAL.INTEREST>

CALL F.READ(FN.ACCR.ACCT.DR,AC.ID,AC.DR.REC,F.ACCR.ACCT.DR,ACCT.DR.R.ERR)

DR.TOT.INT = AC.DR.REC<IC.ACRDR.TOTAL.INTEREST>

RETURN

END

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

17
STANDARD SELECTION Record

‰ ID must start with NOFILE.xxxxx to eliminate FILE.CONTROL


validation error

‰ Must have ROUTINE type user field defined

‰ SELECTION type fields can be defined so that the user can


decide exactly what information he wants filtered out and
displayed

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

18
STANDARD SELECTION Record

Routine Type

Selection Type

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

19
Enquiry Set Up

Must be a valid record from


STANDARD.SELECTION
Application. In this case, must
start with NOFILE.

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

20
ENQUIRY Record

This is the method used to extract


the values returned from the routine
The format is
F <delim>,<start pos>,<num of pos>

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

21
Executing The Enquiry

Before the Enquiry results are displayed, since we have defined a selection
field, this appears for the user to input the CUSTOMER ID to be manipulated

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

22
Sample Output

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

23
Summary

‰ A NOFILE enquiry uses a routine to access more than one


application to display information required by the user.

‰ A STANDARD.SELECTION record must be created, with an


ID NOFILE.xxxxxxx for NOFILE enquiry to eliminate the
FILE.CONTROL validation error in T24

‰ A STANDARD.SELECTION record created for NOFILE


enquiry purposes can have logical fields defined in it.
o Routine type fields – These fields will have user type ‘R’
o Selection type fields – These fields will have user type‘S’

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

24
Summary (Cont.)

‰ Selection fields defined, can be used within the routine using the
COMMON variables D.FIELDS and D.RANGE.AND.VALUES
defined in I_ENQUIRY.COMMON

‰ A routine written for NOFILE enquiry purposes should return one


parameter

‰ The ENQUIRY application uses the ID of the STANDARD.


SELECTION in the FILE.NAME field

‰ F <delim>,<start pos>,<no. of pos> - is used to extract the data


in the ENQUIRY

T3ATT – R05 – 1.0 Copyright © 2005 TEMENOS HOLDINGS NV

25

You might also like