Batches and Multithreading
Batches and Multithreading
Batches and Multithreading
Batch Stage consists of one or more processes. In T24, these COB Processes are defined in an application
called BATCH
Each Process consists of one or more Jobs that perform a specific task.
All jobs within a process are executed in the order they are defined and NEVER simultaneously.
For E.g. Job 2, will never get executed before Job 1 is complete.
Batch Stage Contains a character to denote the Batch Stage and a 3 digit number to denote the sequence
within the stage.
Sequence numbers are in the range 000 - 999. The first Batch stage executed during COB is A000 and the last
is O999.
BATCH>PROCESS>JOB
PROCESS
A record in the BATCH application is called a process.
All processes are prefixed with the bank mnemonic
Processes to be executed during COB must belong to a Batch Stage.
Processes that do not belong to a Batch Stage will be executed as services.
Process Status field holds the status of the Batch record. It can hold the following values
0 specifies that the process is in Ready state
1 specifies that the process is in Running state
2 specifies that the process has Completed successfully
3 specifies that the process has stopped due to some Error
JOBS
job is a part of process
process can have many jobs
Job Name Contains the name of the routine to be executed. All routines defined here will have an entry in
PGM.FILE with TYPE set to ‘B’
Job Status field Holds the status of the individual job (routine) . It can hold the following values
0 specifies that the job is in Ready state
1 specifies that the job is in Running state
2 specifies that the job has Completed successfully
3 specifies that the job has stopped due to some Error
2types
run during cob(batch stage)
during daytime
DIFFERENT STAGES THE BATCH GOES THROUGH -APPLICATION-A100
A-S-R-D-O
(going to be executed in first stage of cob,all individual application processes)
SYSTEM WIDE-S100 (charge,interest calculation,loan schedules)
REPORTING-R100 (important reports/transaction journals/general ledger)
START OF THE DAY-D100 change of date will happen here
ONLINE-O100 no changes will be allowed
BATCH STAGE -each stage verifies the completion of all the processes in the previous stage
ROUTINES PRESENT
LOAD
SELECT
PROCESS/MAIN
2 DISTINCT MODES -ONLINE for entering contracts and static data information
-BATCH for processing lot of events at a time
for ex: changing dates everyday, calculating interest
-Providing BATCH.STAGE if you want any particular job to be run in desired mode(0123-ONLINE, R100 -
REPORTING, A100 APPLICATION)
Frequency specifies the frequency at which the batch job has to be executed. It can have values as follows.
-D specifies that the job will be executed every working day.
-D nn specifies that the job will be executed every nnth working day
-W specifies that the job will be executed on a weekly basis, that is every Friday
-M specifies that the job will be executed on the last working day of every month
-M nn nn represents the offset added to the first day of every month to arrive at Next Run date.
-Y specifies that the job will be executed last working day of the year
-Y nn specifies that the job will be executed the last working day of the nn'th month
*****A specifies that the job will be executed on adhoc basis. You should manually specify a date on which
the job has to be executed.
MULTITHREADING -when one or more process can execute a single
process,the process is said to be multithreaded
Thread -is a independant/executable unit of process
-------------------putty steps---------------
sh tRun START.TSM
sh tRun START.TSM -DEBUG(understand how many agents are running)
----------DEBUGGER STEPS-------------
Source changed to /data/temenos/env/r19/bnk/UD/PRIYANKA.BP/BATCH/CUS.RAUT.b
26 : DEBUG
TAFJ Debugger-> S
29 : Y.ID =Y.LIST
TAFJ Debugger-> S
34 : CALL F.READ(FN.CUSTOMER,Y.ID,R.CUS,F.CUSTOMER,ERR.CUS)
TAFJ Debugger-> S
35 : IF R.CUS THEN
TAFJ Debugger-> S
37 : Y.NAME = R.CUS<EB.CUS.NAME.1>
TAFJ Debugger-> S
38 : Y.MNE = R.CUS<EB.CUS.MNEMONIC>
TAFJ Debugger-> S
39 : Y.SECTOR = R.CUS<EB.CUS.SECTOR>
TAFJ Debugger-> V Y.NAME
Y.NAME : (-1) PRASHANT
TAFJ Debugger-> V Y.MNE
Y.MNE : (-1) AKHAOSE
TAFJ Debugger-> S
41 : Y.GENDER = R.CUS<EB.CUS.GENDER>
TAFJ Debugger-> S
43 : Y.ARRAY<-1> = Y.NAME:"*":Y.MNE:"*":Y.SECTOR:"*":Y.ACC.OFF:"*":Y.GENDER
TAFJ Debugger-> S
44 : END
TAFJ Debugger-> S
45 : IF Y.ARRAY THEN
TAFJ Debugger-> S
46 : Y.FILE = "CUS.REPORT.csv"
TAFJ Debugger-> V Y.GENDER
Y.GENDER : (-1) MALE
TAFJ Debugger-> S
48 : CALL F.READ(FN.PATH,Y.FILE,R.FINAL,F.PATH,ERR)
TAFJ Debugger-> S
49 : R.FINAL<-1>= Y.ARRAY<-1>
TAFJ Debugger-> S
50 : CALL F.WRITE(FN.PATH,Y.FILE,R.FINAL)
TAFJ Debugger-> S
51 : END
TAFJ Debugger-> S
52 : END
TAFJ Debugger-> V Y.ARR
Y.ARR : N/A
TAFJ Debugger-> V R.FINAL
R.FINAL : (-1)
TAFJ Debugger-> V Y.ARRAY
Y.ARRAY : (-1) PRASHANT*AKHAOSE*1001*1*MALE
TAFJ Debugger-> V Y.FINAL
Y.FINAL : N/A
TAFJ Debugger-> V R.FINAL
R.FINAL : (-1)
TAFJ Debugger-> S
55 : RETURN
TAFJ Debugger-> S