Cob2.Close of Business-Batch - Job.control Errors r13
Cob2.Close of Business-Batch - Job.control Errors r13
Cob2.Close of Business-Batch - Job.control Errors r13
2. Printer Name field holds the Name of the printer where the output of the job
needs to be sent to. If left blank, the printer specified in the Default Printer field
will be used
3. Data field holds the Input parameters for the job specified in JOB NAME. Usually
contains ENQUIRY REPORT ids or REPGEN ids. In this screen shot when you
see ENQ followed by EU.FX.PL.TODAY you might think that this is the name of an
enquiry NO. This is the ID of a ENQUIRY.REPORT application and should be
specified in this manner in the DATA field
4. Job Message : In case the job results in an error, the error message is stored in
this field. The error message gets cleared once the job error has been corrected
and the jobs Job Status changes to 2
3. LOAD and RECORD routine are executed by all tSA and SELECT routine is
executed by only ONE tSA. The main job of the SELECT routine is to select all the
IDs that need to be processed. Now, imagine a scenario, where in interest needs
to be accrued for 1000 accounts as part of a COB job. Would you like all tSAs to
perform a select on and get the list of account ids and want each of them to accrue
interest for all the accounts? Of course not. It would suffice if one agent performs
a select and stores the selected ids in a common file so that all agents can share
and process the ids. This is the reason why only one agent performs the select
while the others wait until the select is complete.
4. Instead of executing one long routine (by only one tSA), breaking it up into logical
parts and then executing it (by multiple tSA), is faster
3. If the field BATCH.JOB for that particular job contains the name of a routine (can be
the same name as that of the job) then the routine is single threaded. In other
words, if the field BATCH.JOB is not NULL or does not contain
@BATCH.JOB.CONTROL then the routine is single threaded
3. This routine will loop through F.LOCKING with @ID starting with F.JOB.LIST.1,
and will return the one (List file name) that is first available
4. If this LIST file does not exist then BATCH JOB CONTROL will create the LIST file
2. All the tSA try to Read and Lock a record with @ID as Flag ID in F.BATCH.STATUS.
One tSA succeeds while the other tSAs wait for the Lock to be released. First time
this record will not exist in F.BATCH.STATUS, we use a jBASE command to read and
lock a record; this command will lock a record even if the record does not exist.
3. The tSA which has acquired the lock on F.BATCH.STATUS record with @ID as Flag
Id will perform the List File allocation (refer to next slide for list file allocation logic)
4. The value in the second position of the record is checked. If it not processing, then the
SELECT has to be performed. A value of Processing signifies that the select is over
and the processing of contract IDs should begin. Since the .SELECT has not yet been
executed for this job, this position will be empty.
2. The client might want to Bulk records in the a particular job to improve
performance. In that case, he can open the PGM.FILE entry for that job and enter
the number of contracts to bulk in the field BULK.NO. It also possible to specify
the bulk no in the parameter to BATCH.BUILD.LIST. However, the value
configured in PGM.FILE takes precedence. The value in this field should be
numeric and between 1 and 200 as the maximum bulk limit is 200.
3. Till now we have seen that every row in the LIST record has only 1 contract ID in
it. We can have up to a maximum of 200 contract IDs per row in a LIST record.
Each contract in the row is delimited by VMs (Value Markers). In this example of a
multi threaded routine CLEAR.WF, the bulk count has been set as 3, so the list file
record has got 3 contracts separated by a VM.
1. STEP 1:Both the tSAs will check if the content of F.BATCH.STATUS is set to
PROCESSED, if not, it means there are contract IDs to be executed. The tSA
will update the JOB.STATUS field in F.TSA.STATUS record to 1. This value
stands for Processing contracts.
2. STEP 2: Initialise a variable, which will hold all the LIST records to be processed.
The name of this variable is FULL.LIST.
3. STEP 3: Set the JOB.PROGRESS field in F.TSA.STATUS to 4 which means
selecting from the LIST FILE.
4. STEP 4: The tSA that executed the select, will store all the LIST record ids
separated by FM (field markers). All the other tSAs that didnt execute the
.SELECT routine will perform a select on the LIST FILE, extract the LIST record
ids and store them in a variable. This is done to improve performance. Every
select statement executed is an I/O on the database. So, the tSA that executed
.SELECT routine need not again execute a select statement to pick up LIST
records from the LIST FILE.
1. When a tSA extracts contract IDs in this case, it extracts all IDs till the first FM
(Field Marker). In the above example, tSA 3 extract contract1, contract2 and
contract3 together i.e. till it encounters the first FM. After starting the transaction
block it processes all the 3 contracts within the same transaction block. The record
routine is executed thrice (once for each contract ID) within a loop. Once the loop
is over, the tSA removes the group of contract IDs from the LIST FILE in one go.
3. The agent that gets the lock on the ID in the LIST file will be the one which
executes the single threaded routine
3. This routine takes care of updating the following fields in F.TSA.STATUS every
60 sec
3.1 LAST.CONTACT.TIME
3.2 JOB PROGESS
3.3 LAST MESSAGE
2. On every call to SERVICE.HEARTBEAT, the tSAs(any agent other than the one
allocated for TSM) checks if the TSM is alive.
3. In Phantom mode, agents re-launch the manager, if TSM has not reported for a
specified period of time(an update of the last contact time of TSM is maintained in
F.LOCKING with records key as TSM:<Server Name>. If difference between
current time and last contact time as updated for TSM is greater than 120
seconds, then the tSA will re-launch the TSM)
From time to time within COB processing, mainly within BATCH.JOB.CONTROL, a file
called &COMO& is updated. This file resides in the T24 Home directory
(bnk.run) and contains the log of what every tSA has done. There is one record
per tSA per day in this file. The @ID of the record in this file is tSA_<Agent
Number>_<Date>_<Time>. The date format is YYYYMMDD and the time format
is HH-MM-SS
E.g.: tSA_2_20100324_17-32-10.
We can view the log stored in &COMO& through the JED editor. At the jshell prompt,
type
JED &COMO& tSA_<Agent Number>_<Date>_<Time> to view the log of a
particular tSA.
If an error is encountered during the execution of a critical job then, the agent
executing COB will crash out in this case and return to the jBASE prompt (In
Interactive Mode). In phantom mode you will be able to see that the agent has stopped
in the AGENT.STATUS enquiry output. It (the agent) DOES NOT write the error to
applications called EB.EOD.ERROR and EB.EOD.ERROR.DETAIL, DOES NOT
remove the contractID from the LIST FILE and then crashes. The PROCESS.STATUS
field and JOB.STATUS field in the corresponding BATCH record is updated to 3
(which stands for Error/Hold). This means that if a critical job fails, the cause of error
needs to be corrected immediately before COB is restarted again.
2. Repeated crashes on the same job within a time interval stops the service.
Duration and the number of crashes can be configured at TSA.PARAMETER table
through fields (STOPPAGE TIME & STOP COUNT Number of times the crash
happens for a service i.e. for the agents within a specified time).
The first time the agent is marked as DEAD, TSM updates a record with key as
<Service Name>-STOP in F.LOCKING with the stop time and stop count as one. If
not the first crash, then the time difference between the first stop time and the
current time is checked and if it has exceeded the stop time period specified in
TSA.PARAMETER, then the current time is updated as the first stop time.
Otherwise if the stop count has exceeded the limit specified, then the service is
stopped.
5. All variables and their values at the time of crash are also stored.
6. The core dump uses jBASE system functions to obtain the required information.