0% found this document useful (0 votes)
696 views3 pages

Multi-Thread Example Step by Step in T24

This document provides steps for setting up and running a multithreaded example in jBASE. It includes routines for common variables, loading variables, and processing records for a customer account. The steps show compiling the routines, setting up the program file, batch job, TSA service, and workload profile. Finally, it describes starting the TSA service to run the multithreaded example.

Uploaded by

Mazba Uddin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
696 views3 pages

Multi-Thread Example Step by Step in T24

This document provides steps for setting up and running a multithreaded example in jBASE. It includes routines for common variables, loading variables, and processing records for a customer account. The steps show compiling the routines, setting up the program file, batch job, TSA service, and workload profile. Finally, it describes starting the TSA service to run the multithreaded example.

Uploaded by

Mazba Uddin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MULTITHREAD EXAMPLE STEP BY STEP

1. COMMON ROUTINE

File GVA.BP , Record 'TEST.MULTITHREAD.COMMON'


Command->
001 **Testing multi thread routine
002 COM/TESTMUL/FN.CUSTOMER.ACCOUNT,
003 FN.ACCOUNT,
004 F.CUSTOMER.ACCOUNT,
005 F.ACCOUNT,
006 FN.MY.APP,
007 F.MY.APP

2. LOAD ROUTINE

File GVA.BP , Record 'TEST.MULTITHREAD.LOAD'


Command->
001 SUBROUTINE TEST.MULTITHREAD.LOAD
002
003 $INSERT I_COMMON
004 $INSERT I_EQUATE
005
006 $INSERT TEST.MULTITHREAD.COMMON
007
008 FN.ACCOUNT = 'F.ACCOUNT'
009 CALL OPF(FN.ACCOUNT,F.ACCOUNT)
010
011 FN.CUSTOMER.ACCOUNT = 'F.CUSTOMER.ACCOUNT'
012 CALL OPF(FN.CUSTOMER.ACCOUNT,F.CUSTOMER.ACCOUNT)
013
014 FN.MY.APP = 'F.MY.APP'
015 OPEN FN.MY.APP TO F.MY.APP ELSE
016 CRE.CMD = 'CREATE-FILE F.MY.APP TYPE=J4 1 1'
017 EXECUTE CRE.CMD
018 OPEN FN.MY.APP TO F.MY.APP ELSE NULL
019 END
020
021 RETURN

3. RECORD ROUTINE
File GVA.BP , Record 'TEST.MULTITHREAD'
Command->
001 SUBROUTINE TEST.MULTITHREAD(CUS.ID)
002
003 $INSERT I_COMMON
004 $INSERT I_EQUATE
005
006 $INSERT I_F.ACCOUNT
007
008 $INSERT TEST.MULTITHREAD.COMMON
009
010 CALL
F.READ(FN.CUSTOMER.ACCOUNT,CUS.ID,R.CUSTOMER.ACCOUNT,F.C
USTOMER.ACCOUNT,YERR)
011
012 TOT.BAL = 0
013 FOR ACC.IDX = 1 TO DCOUNT(R.CUSTOMER.ACCOUNT,FM)
014 ACC.ID = R.CUSTOMER.ACCOUNT<ACC.IDX>
015 CALL
F.READ(FN.ACCOUNT,ACC.ID,R.ACCOUNT,F.ACCOUNT,YERR)
016 TOT.BAL += R.ACCOUNT<AC.WORKING.BALANCE>
017 NEXT ACC.IDX
018
019 WRITE TOT.BAL TO F.MY.APP,CUS.ID
020
021 RETURN
022 END

4. Compile all the routines

5. PGM.FILE Setup

PROGRAM TEST.MULTITHREAD
1 TYPE.............. B
2. 1 GB SCREEN.TITLE
3 ADDITIONAL.INFO...
4. 1 BATCH.JOB...... @BATCH.JOB.CONTROL
5 PRODUCT........... EB
6 SUB.PRODUCT.......
7. 1 DESCRIPTION....

6. BATCH Setup
---BNK/GB.EXIM.B.REVALUATION
BATCH PROCESS..... MY.MULTITHREAD
3 PROCESS.STATUS.... 0
4 BATCH.ENVIRONMENT. F
6. 1 JOB.NAME....... TEST.MULTITHREAD
8. 1 FREQUENCY...... D
12. 1 JOB.STATUS..... 0
13. 1 LAST.RUN.DATE.. 07 MAR 2003
17 CURR.NO........... 1

7. TSA.SERVICE Setup
----BNK/GB.EXIM.B.REVALUATION
SERVICE........... MY.MULTITHREAD
1 DESCRIPTION....... MULTI THREAD EXAMPLE
3. 1 WORK.PROFILE... ONE
4 USER.............. INPUTT
5 SERVICE.CONTROL... START
15 CURR.NO........... 18

8. TSA.WORKLOAD.PROFILE Setup
---GB.EXIM.B.REVALUATION
WORKLOAD.PROFILE.. ONE
1 DESCRIPTION....... FOR TSM
3. 1 AGENTS.REQUIRED 1
15 CURR.NO........... 1

9. Start the service in the jBASE prompt

--->START.TSM

This small lesson whould help you..


_________________
MALAI

You might also like