Sei sulla pagina 1di 4

Deal Slip Routines

Objectives

 To understand the need for deal slip routines


 To understand the way to write a deal slip routine
 To understand the method to attach the routine to a deal slip.

1.1 Introduction

DEAL SLIP is a brief summary of a particular transaction. They are mainly used
in teller transactions for the customer to know his position after a withdrawal or deposit. In Globus
deal slips can be triggered at various stages of the transaction namely Input, Authorise, Copy,
Reverse and the keyword FINISH.

2.1 Deal Slip Routines

As you would be aware by now, deal slips can pick up data from multiple files.
There could be situations where a specific value from a file other than the main file on which the
deal slip is based needs to be populated in the deal slip, which we would not be able to accomplish
by linking the 2 files. In such cases routines can be used to extract the necessary value and
populate it in the deal slip.

3.1 Example 1

The application CHEQUE.ISSUE is used to issue cheque books to customers.


When chequebooks are issued to customers, the Account Number and the Account Title need to
be printed on the cheque leafs in the following format. Pre printed stationary with the bank name is
available. Only the Account Number and the Account Title need to be printed.

Bank XYZ -------/-------/20-----

Pay ------------------------------------------------------------------------------------ a sum of

---------------------------------------------------------------------------------------- only.

18654 Mark Smith

Figure 1.1 A Sample Cheque With The Account Number And The Account Title

3.2 Analysis

When cheques are to be issued to a customer, the application CHEQUE.ISSUE is used. The ID
of the records in the application is in the following format

Id Of CHEQUE.TYPE Application.Account Number.Sequence Number(5 Digit)

CHQ.18654.00001

Temenos Training Publications 74


We need to supply the following values when a chequebook is issued to a customer using this
application

Issue Date The current date (The date on which the cheque book is issued)
Number Issued The number of cheques to be issued to the customer
Currency The currency involved
Charge Any charge that needs to be collected for the issue of cheques.
Cheque Starting Number The starting number or the cheque number of the first cheque in
the chequebook.

Once a record in this application is committed, a deal slip needs to get printed in
the above-mentioned format(Refer Figure 1.1). The deal slip, which is to be printed on, pre-
printed stationary needs to print the account number and the account name. The account
number is available in the application, but the account name needs to be picked up from the
Account application. For this purpose we need to write a subroutine that will use the account
number, read the account file, extract the account name and display it on the deal slip.

3.3 Algorithm

Following is the algorithm of the deal slip routine.

 Open the Account File


 Read the record pertaining to the specific account number(This account number will have
to be supplied as an input parameter to the deal slip routine)
 Form the record, extract the account name and pass it back to the DEAL.SLIP.FORMAT
application through the subroutine.

All deal slip routines will take in 1 input parameter.

3.4 Where Do We Attach This Subroutine

Deal Slip Routines are attached to the DEAL.SLIP.FORMAT application in field number 7 –
FORMAT. The name of the deal slip routine needs to be prefixed with an ‘@’ symbol when attached
to the DEAL.SLIP.FORMAT application. This subroutine needs to have an entry in the PGM.FILE
with the TYPE set to ‘S’, which denotes ‘Subroutine’.

3.5 Solution 1

Step 1

Write the subroutine that will take the account number as the input parameter and return the
account name.

*Deal slip routine for the CHEQUE.ISSUE application.


*This subroutine takes in the account number as an input parameter and using the account
*number reads the Account file and extracts the Account Name for that specific account number.
*The extracted Account Name is passed back to the deal slip as an output parameter
*
SUBROTUINE TRG.DS.CHQ.ISSUE.RTN(ACCOUNT.NAME)
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.ACCOUNT
AC.ERR = ‘’
FN.AC = ‘F.ACCOUNT’

Temenos Training Publications 75


F.AC = ‘’
CALL OPF(FN.AC,F.AC)
Y.ACCOUNT.NUMBER = ACCOUNT.NAME
CALL F.READ(FN.AC,Y.ACCOUNT.NUMBER,R.AC.REC,F.AC,AC.ERR)
ACCOUNT.NAME = R.AC.REC<AC.ACCOUNT.TITLE.1>
RETURN
END

Note:

The variable ACCOUNT.NAME is the variable that is used as both the input as well as the
output parameter. When the routine is invoked, the variable ACCOUNT.NAME will hold the
Account Number(Incoming value from the deal slip). Once the processing is over in the
subroutine, the Account Name is sent back to the deal slip using the same variable
ACCOUNT.NAME, now as an output parameter.

Compile and catalog the subroutine.

Step 2

Make an entry in the PGM.FILE for the subroutine. Ensure that you set the TYPE to ‘S’.

Figure 2.1 PG.FILE Entry For The Deal Slip Routine TRG.DS.CHQ.ISSUE.RTN

Step 3

Create a record in the DEAL.SLIP.FORMAT application. Make sure to attach the subroutine.

Figure 3.1 DEAL.SLIP.FORMAT Record For the Printing Cheques

Temenos Training Publications 76


Note:
In this case the subroutine has been attached to the field ACCOUNT.NO. Here Account
Number is the last extracted value and thus is passed as the input parameter for the
subroutine, thus facilitating the subroutine to extract the Account Name.

Step 4

Create a version for the CHEQUE.ISSSUE application and attach the deal slip to it.

Figure 4.1 Version For The Cheque Issue Application With The Deal Slip Attached

Note:
In the above version, since field names are not specified explicitly, all the fields in the
application CHEQUE.ISSUE will be displayed one after the other.

Input a record using the CHEQUE.ISSUE,TRG version and authorize it. The deal slip would get
printed.

Summary

 A deal slip is a brief summary of a transaction in Globus


 A routine can be attached to any field that has been defined in the DEAL.SLIP.FORMAT
record
 A deal slip routine needs to have an entry in the PGM.FILE with a type set to ‘S’.
 The deal slip routine name prefixed with an ‘@’ symbol needs to be specified in the field
FORMAT of the DEAL.SLIP.FORMAT application.

Temenos Training Publications 77

Potrebbero piacerti anche