Sie sind auf Seite 1von 49

CLOSE OF BUSINESS

CLOSE OF BUSINESS

• Introduction to COB
• Stages in COB
• Features in COB
• Configuring COB
INTRODUCTION

• In T24, Batch Processing is handled by the


Close Of Business (COB).

• Marks the end of all financial transactions for a


day.
COB – STAGES
• Application wide - Individual application process
(Forex, Funds Transfer etc.)

• System wide - System wide process


(Interest & Charges, Revaluation etc.)

• Reporting - Main system reports (trial


balance, general ledgers, transaction journal etc.)
• Start Of Date - Change Date (Standing orders,
split month end events, cash flow maintenance
etc.)

• Online - Any non critical reports and processes


which can be run after the system has returned to
online mode

Based on this order the close of business runs


various processes.
BATCH
• This application defines the jobs which are to be run in batches
at EOD.
• Each stage consists of a number of processes, which
correspond directly to records on the BATCH file, and each
process consists of a number of jobs which are routines defined
on PGM.FILE as type ‘B’.
• The batch system will run all stages in sequence. The ON-
LINE stage of the batch is run immediately after the system
has returned to on-line mode. Whilst this stage is running the
system will be available for user entry.
COB – HIGH LEVEL OVERVIEW
INITIATE COB

System mode changed to


Batch

Execution of jobs in
A-S-R-D order

System mode changed back to


Online

Execution of jobs in Online stage


Date Changes

There are a number of tasks that get executed as a part of the


COB process. The date change is the most crucial one.

Company Code Today Next Working Last Working


Day Day

SEP0010001 14th July 2008 15th July 2008 13th July 2008

SEP0010001-COB 13th July 2008 14th July 2008 12th July 2008
Dates Record during COB process

Job Name :EB.CYCLE.DATES


Batch Stage : A001

This is the first job to get executed as a part of the COB


process. It will cycle the dates for the online user.
Dates Record during COB process

Job Name :BATCH.DATE.RESET


Batch Stage : O999

This job changes the next run date.


FEATURES OF COB

• COB can be run with the users signed on.


• Background/Foreground modes
• All jobs are Multi threaded
• Como is created for each service agent
• List file is for selected records to be processed.
CONFIGURING COB

• TSA.SERVICE
• TSA.WORKLOAD.PROFILE
• TSA.PARAMETER
• TSA.STATUS
TSA.WORKLOAD.PROFILE

TSA.WORKLOAD.PROFILE, defines the number of agents,


which should be launched to support the service.

ID - Anything
AGENTS.REQUIRED - Number of tSAs to dedicate 0-N
TSA.WORKLOAD.PROFILE
The maximum number of agents that will be supported is
mentioned in the SPF
TSA.WORKLOAD.PROFILE
The number of tSA to be dedicated would be specified in
AGENTS.REQUIRED field
TSA.PARAMETER

This file enables the tSM to monitor the tSAs at fixed intervals of time
This is done by two important fields
• REVIEW.TIME
Specifies the number of seconds the tSM will sleep before reviewing
the tSA.SERVICEs,
• DEATH.WATCH
Specifies the maximum number of seconds allowed for an agent to
report to the tSM.
TSA.PARAMETER
TSA.SERVICE
To initiate a COB, record ‘TSM’ in TSA.SERVICE needs to be
started
TSA.SERVICE
To initiate the COB service, the record ‘COB’ in
TSA.SERVICE has to be marked for Starting.
TSA.SERVICE

• After marking service control as ‘START’ for TSM and TSA , open
necessary sessions.

• One session for TSM and required no of sessions for TSAs


depending on agents specified in TSA.WORKLOAD.PROFILE.
TSA.SERVICE
From the jsh prompt initiate TSM using
jsh ---- > START.TSM –DEBUG

This will prompt you to manually launch tSAs with agent


number.
TSA.SERVICE

From the jsh prompt initiate TSM using


jsh ---- > tSA 2 -DEBUG

This will start tSAs and COB as well.


TSA.STATUS
This file shows the status of the agents
LIST FILES

• Every job during the Close Of Business uses a LIST file for
storing and sharing the records for processing between
different agents.
• Name of the List file have format like this
F<company mnmonic>.JOB.LIST.<agent no>
Example:
FBNK.JOB.LIST.1
COMO

• The Como will be written with the session no to distinguish


processing

• The Como will be written with the key as tSA_<agent


no>_datetime
MONITORING COB

• Enquiry COB.MONITOR helps in monitoring the progress of


COB

• It gives the details for each job (Start time, End time, Records
processed and Records selected and time taken for processing
each record)
COB.MONITOR (use Reflection)
• COB.PROGRESS.DISPLAY
• ================================================================================
• ==========
• TIME : 12:22:27 08 MAR 2010 COB-DATE :
• COB Running in
• ================================================================================
• ==========
• STAGE PROGRESS PROCESSED TOTAL %
• COMPLETED
• ================================================================================
• ==========
• APPLICATION [ ] 0 65
• 0.00

• SYSTEM WIDE [ ] 0 32
• 0.00

• REPORTING [ ] 0 52
• 0.00

• START OF DAY [ ] 0 43
• 0.00

• ONLINE [ ] 0 28
• 0.00

• ================================================================================
• ==========
• COB [ ] 0 220
• 0.00
ERROR HANDLING

• If an error occurs, it displays the error message with the


process name and job name.

• In case of less severe errors, updates the record for the current
batch run and the current company on the EB.EOD.ERROR
file and continues.
ERROR HANDLING

The details of these errors can be found be examining the


records of

EB.EOD.ERROR
EB.EOD.ERROR.DETAIL
SUMMARY

• COB can be initiated with users signed on.


• It is controlled by TSM and TSAs.
• TSA.SERVICE is the application used for setting ‘START’ for
services of TSM and COB.
• After Configuring Service profiles , COB can be initiated from
jsh prompt.
MULTITHREADED ROUTINES

• OBJECTIVES
 To Understand the Multi Threading Concept.

 To understand the steps to create a multithreaded end of day


subroutine.

 To understand the steps to attach a subroutine to the BATCH


application in Globus.
 When a single process can be executed by more than one
processor then it is said to be Multithreaded.

 Multi threaded routines get executed as a part of EOD/COB


process.

 Reduces the routine execution time considerably based on


no.of processors performing the process.
WORKING OF MULTITHREADING
• BATCH.JOB.CONTROL is the routine which is responsible
for splitting the job to multiple processors and executing them
simultaneously.
• XXX.LOAD - Routine which performs the initialization.
• I_XXX.COMMON - Holds all common variables for the
process.
• XXX.SELECT - Used to select all the ids which is to be
processed.
• XXX - Routine which does the processing for the passed id.
FLOW OF EXECUTION

• XXX.COMMON  XXX.LOAD  XXX.SELECT


 BATCH.JOB.CONTROL  Updates Ids into list file 
XXX
Example of multithreaded routine -

• Create a Local reference field ‘LAST.EOD.DATE’ in


Customer Application. Write a Batch routine that updates this
local reference field with TODAY’s date during EOD.
. STEP 1
Write a routine by name I_MULTI.RTN.COMMON and
define various variables that are to be used.
COM /TMR/ FN.CUSTOMER,
F.CUSTOMER,
SEL.LIST,

 COM is a keyword followed by a name which is followed by


set of variables.
 This insert file should be included in remaining XXX.LOAD,
XXX.SELECT and XXX routines
• STEP 2
 Write a routine named MULTI.RTN.LOAD which opens all
necessary files.

 Note that MULTI.RTN.LOAD routine should be included


with insert file I_MULTI.RTN.COMMON.
SUBROUTINE MULTI.RTN.LOAD
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_MULTI.RTN.COMMON
FN.CUSTOMER = ‘FBNK.CUSTOMER’
F.CUSTOMER = ‘’
CALL OPF(FN.CUSTOMER,F.CUSTOMER)
RETURN
END
STEP 3

Write a routine by name MULTI.RTN.SELECT and select


the records to be processed during EOD.
Call BATCH.BUILD.LIST subroutine.

It’s a core Globus subroutine that actually writes the list of ids
on to the LIST file. It takes in 2 parameters, the name of the
LIST file and the variable that holds the ids.
SUBROUTINE MULTI.RTN.SELECT
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_MULTI.RTN.COMMON
SEL.CMD=“SELECT “:FN.CUSTOMER
CALL EB.READLIST(SEL.CMD,SEL.LIST,’’,NO.OF.REC.SEL.ERR)
CALL BATCH.BUILD.LIST(‘ ’,SEL.LIST)
RETURN
END
STEP 5
 Write a routine MULTI.RTN that will process all the ids
selected.

 It should be passed with one argument which holds the record


id to be processed.
SUBROUTINE MULTI.RTN(Y.CUS.ID)
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_MULTI.RTN.COMMON
CALL
F.READ(FN.CUSTOMER,Y.CUS.ID,R.CUSTOMER,F.CUSTOMER,Y.C
US.ERR)
R.CUSTOMER<EB.CUS.LOCAL.REF,8> = TODAY
CALL F.WRITE(FN.CUSTOMER,Y.CUS.ID,R.CUSTOMER)
RETURN
END
STEP 6
Create a PGM.FILE with TYPE = B
STEP 7
Create a Entry in BATCH application with Job name as ‘Routine name’
Run COB

• Now run the COB and Check whether the Multi threaded
routine gets invoked and the code is working or not.
Summary
 When a single process can be executed by more than one
processor, the process is said to be multi-threaded.
 BATCH.JOB.CONTROL is the Globus subroutine that
makes multi threading possible in Globus.
 The xxx.SELECT routine will form a key only file containing
all the ids which need to be processed by this job.
THANK YOU…

Das könnte Ihnen auch gefallen