Professional Documents
Culture Documents
PRG10.WSS - Multithreaded Routines-R13 PDF
PRG10.WSS - Multithreaded Routines-R13 PDF
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.
Multithreaded Routines– Workshop Solutions
Table of Content
Table of Content ...................................................................................................................................... 2
Workshop 1 ............................................................................................................................................. 3
Workshop Solution 1 ............................................................................................................................ 3
Step 1 ............................................................................................................................................... 3
Step 2 ............................................................................................................................................... 4
Step 3 ............................................................................................................................................... 4
Step 4 ............................................................................................................................................... 4
Step 5 ............................................................................................................................................... 4
Step 6 ............................................................................................................................................... 5
Step 7 ............................................................................................................................................... 6
Step 8 ............................................................................................................................................... 6
Step 9 ............................................................................................................................................... 7
Step 10 ............................................................................................................................................. 7
Step 11 ............................................................................................................................................. 8
Step 12 ............................................................................................................................................. 9
Workshop 2 ............................................................................................................................................. 9
Workshop Solution 2 .......................................................................................................................... 10
Step 1 ............................................................................................................................................. 10
Step 2 ............................................................................................................................................. 10
Step 3 ............................................................................................................................................. 12
Step 4 ............................................................................................................................................. 12
Step 5 ............................................................................................................................................. 13
Step 6 ............................................................................................................................................. 13
Step 7 ............................................................................................................................................. 13
Step 8 ............................................................................................................................................. 14
Workshop 1
An external interface is writing information in order to raise FUNDS.TRANSFER’s in T24. The
interface writes the ID’s in an ACTIVATION FILE named F.CREATE.FT.LIST and the actual message
is dumped in another file named F.ACTUAL.FT.MSG
F.CREATE.FT.LIST is a JR file, and F.ACTUAL.FT.MSG is an UD File.
A sample record id in F.CREATE.FT.LIST will be FT1 and the contents will be FT1, FT2 and its
contents FT2, so on and so forth. Basically this file will only contain the ID’s.
A sample record ID in F.ACUTAL.FT.MSG file will be FT1 and the contents will be
AC,22117,AUD,123,14524 i.e. all the details required to raise an Account to Account type FT
transaction in T24 (TRANSACTION.TYPE, DEBIT.ACCT.NO, DEBIT.CURRENCY, DEBIT.AMOUNT,
CREDIT.ACCT.NO)
You will have to write a Multithreaded routine that picks up the ID from the activation file, reads the
corresponding record from the ACTUAL.FT.MSG file and then calls OFS.POST.MESSAGE in order to
raise a FT Transaction. Make this multithreaded routine run as a service BNK/CREATE.FT
Workshop Solution 1
Step 1
F.ACTUAL.FT.MSG
Step 2
Step 3
Step 4
Step 5
Write the RECORD routine as there will be no .SELECT routine. You will have to use sequential file
commands to read a record from the UD file F.ACTUAL.FT.MSG
SUBROUTINE CREATE.FTS(REC.NAME)
$INSERT I_CREATE.FTS.COMMON
Step 6
Make an entry in PGM.FILE for the above multithreaded routine. Name ID will be CREATE.FTS
Step 7
Step 8
Make an entry in TSA.SERVICE for the service BNK/CREATE.FT. Set the service control field to
START
Step 9
Step 10
Star the TSM and the required agents. Check the F.OFS.MESSAGE.QUEUE. Make sure that the
OFS.STRING is created there. Start the OFS.MESSAGE.SERVICE, in order to raise the FT
transaction
Step 11
Check the F.OFS.RESPONSE.QUEUE to view the FT Transaction ID created as a result of starting
the OFS.MESSAGE.SERVICE. Open the FT to view its contents.
Step 12
Workshop 2
This workshop is based on the common variable CONTROL.LIST. There are 2 work files
F.WORKFILE.1 and F.WORKFILE.2 that are populated with temporary data during the day today
activities of the bank. The contents of this file have to be cleared during the close of business
operations. The job is adhoc. You will have to write a multithreaded routine to clear the contents of
these two files.
(For initial testing you can create a service. After the session on COB you can add this JOB in the
BATCH STAGE A001 and delete the TSA.SERVICE record)
Workshop Solution 2
Step 1
Create the files F.WORKFILE.1 AND F.WORKFILE.2. Enter records in them. (Copy from an existing
folder into the these two files)
F.WORKFILE.1 and F.WORKFILE.2
Step 2
COM/CLEAR.WF/FN.WF1,
F.WF1,
FN.WF2,
F.WF2,
FN.WF
F.WF2=""
CALL OPF(FN.WF1,F.WF1)
CALL OPF(FN.WF2,F.WF2)
RETURN
END
DO.SELECT:
LIST.PARAM = ""
LIST.PARAM<2>=FN.WF
ID.LIST =""
CRT FN.WF
CALL BATCH.BUILD.LIST(LIST.PARAM,ID.LIST)
RETURN
END
CALL F.DELETE(FN.WF,WF.ID)
RETURN
END
Step 3
Step 4
Create the PGM.FILE entry. ID – CLEAR.WF
Step 5
Create the BATCH entry. ID – BNK/CLEAR.WF (This screen shot is for running it as a service)
Note: To run this program as part of COB, input a batch stage in the above record
Step 6
Step 7
Step 8