0% found this document useful (0 votes)
9 views

PRG2.Programming Using T24 APIs-R10.WSS

Uploaded by

Gedefaye Anteneh
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

PRG2.Programming Using T24 APIs-R10.WSS

Uploaded by

Gedefaye Anteneh
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 10

Information in this document is subject to change without notice.

No part of this document may be reproduced or transmitted in any form or by any means, for any purpose,
without the express written permission of TEMENOS HEADQUARTERS SA.

COPYRIGHT 2007 - 2008 TEMENOS HEADQUARTERS SA. All rights reserved.


PRG2-Programming using T24 APIs
Workshop

Information in this document is subject to change without notice.

No part of this document may be reproduced or transmitted in any form or by any means, for any purpose,
without the express written permission of TEMENOS HEADQUARTERS SA.

COPYRIGHT 2007 - 2008 TEMENOS HEADQUARTERS SA. All rights reserved.


PRG2-Programming using T24 APIs

Table of Contents

Document History.......................................................................................................................... 3
Workshop 1................................................................................................................................... 4
Solution...................................................................................................................................... 4
Workshop 2................................................................................................................................... 7
Solution...................................................................................................................................... 7
Workshop 3................................................................................................................................. 10
Solution.................................................................................................................................... 10

Corporate Training
3
PRG2-Programming using T24 APIs

Workshop 1
Create a subroutine named XXX.RTN which will display the mnemonic and the sector of
any customer in your database
Routine to be placed under XXX where XXX is your folder
Routine to be catalogued to xxxlib where xxx is your folder

Solution

Code

SUBROUTINE CUSTOMER.RTN
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.CUSTOMER

GOSUB INIT
GOSUB OPENFILES
GOSUB PROCESS
RETURN

INIT:
FN.CUS='F.CUSTOMER'
F.CUS=''
Y.CUS.ID=100724
R.CUS=''
Y.CUS.ERR=''
RETURN

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

PROCESS:
CALL F.READ(FN.CUS,Y.CUS.ID,R.CUS,F.CUS,Y.CUS.ERR)
CRT "CUSTOMER MNEMONIC:":R.CUS<EB.CUS.MNEMONIC>
CRT "SECTOR :" :R.CUS<EB.CUS.SECTOR>
RETURN
END

Changes in REMEOTE.CMD

set JBCDEV_BIN=C:\Temenos\R09\bnk\bnk.run\TRAINING
set JBCDEV_LIB=C:\Temenos\R09\bnk\bnk.run\TRAINING

Corporate Training
4
PRG2-Programming using T24 APIs

Compiling The Code

Create PGM.FILE Entry

Execute The Routine

Output

Workshop 2
Write a routine to update the field TEXT in the CUSTOMER application with a value “This
is from training”. Use any customer number of your choice.

Corporate Training
5
PRG2-Programming using T24 APIs

Note : TEXT is a multi value field. Write code in such a way that data is always appended
to the field and not overwritten

Solution

Code

SUBROUTINE CUS.UPDATE
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.CUSTOMER
DEBUG

GOSUB INIT
GOSUB OPENFILES
GOSUB PROCESS
RETURN

INIT:
FN.CUS='F.CUSTOMER'
F.CUS=''
Y.CUS.ID=100724
R.CUS=''
Y.CUS.ERR=''
RETURN

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

PROCESS:
DEBUG
CALL F.READU(FN.CUS,Y.CUS.ID,R.CUS,F.CUS,Y.CUS.ERR,'')
R.CUS<EB.CUS.TEXT,-1>="THIS IS FROM TRAINIING"
* R.CUS<33>="SAMPLE INFO"
CALL F.WRITE(FN.CUS,Y.CUS.ID,R.CUS)
CALL JOURNAL.UPDATE('')
CRT "TEXT VALUE ":R.CUS<33>
RETURN
END

Create PGM.FILE Entry

Corporate Training
6
PRG2-Programming using T24 APIs

Compile The Routine

Execute The Routine

Output

Workshop 3
Display the mnemonic and nationality of all customers

Corporate Training
7
PRG2-Programming using T24 APIs

Solution

Code

SUBROUTINE CUS.DISPLAY
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.CUSTOMER

GOSUB INIT
GOSUB OPENFILES
GOSUB PROCESS
RETURN

INIT:
FN.CUS='F.CUSTOMER'
F.CUS=''
Y.CUS.ID=''
R.CUS=''
Y.CUS.ERR=''
SEL.LIST=''
NO.OR.REC=0
RET.CODE=''
RETURN
OPENFILES:
CALL OPF(FN.CUS,F.CUS)
RETURN

PROCESS:
SEL.CMD='SELECT ':FN.CUS
CALL EB.READLIST(SEL.CMD,SEL.LIST,'',NO.OF.REC,RET.CODE)
LOOP
REMOVE Y.CUS.ID FROM SEL.LIST SETTING POS
WHILE Y.CUS.ID:POS
CALL F.READU(FN.CUS,Y.CUS.ID,R.CUS,F.CUS,Y.CUS.ERR,'')
CRT "CUS MNEMONIC:":R.CUS<1>
CRT "CUS NATIONALITY:":R.CUS<EB.CUS.NATIONALITY>
CRT "----------------------------------------------------"
REPEAT
RETURN
END

Create PGM.FILE Entry

Corporate Training
8
PRG2-Programming using T24 APIs

Compile The Code

Execute The Routine

Output

Corporate Training
9
PRG2-Programming using T24 APIs

Corporate Training
10

You might also like