a_ser1[1].services in t24-r10.01.pdf

Upload: mabderhakim1075

Post on 02-Jun-2018

1.089 views

Category:

Documents


152 download

TRANSCRIPT

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    1/27

    1. Welcome to the Services In T24 learning unit. This learning unit will help you to

    SER1.Services In T24-R10.01

    un erstan t e concept o serv ces n .

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    2/27

    After completing this learning unit/course, you will be able to:

    SER1.Services In T24-R10.01

    Differentiate between Phantoms and Services in T24

    Understand how a service works

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    3/27

    Many software in the market, have processes that need to be run without user intervention.

    SER1.Services In T24-R10.01

    e processes may vary rom s mp e o s o ac ng up stor ca ata to c ear ng otemporary files or as important as interacting with interfaces to another system. Theseprocesses may be required executed once a day or may be required to be executedcontinuously for a period of time. T24 is no different and also has a number of thesebackground processes.

    In the T24 releases prior to R05, these were called Phantoms.

    They were subroutines created in jBASE BASIC using T24 APIs if required and could beexecuted once or in an infinite loop until manually stopped.

    This was handled via an application called EB.PHANTOM. This application was used to startand stop the processes.

    With the introduction of multi threaded programming in release R05, this application can not

    be used if the background process is multi threaded.

    This application is not obsolete and can still be used if required.

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    4/27

    1.Services are also background processes in T24. But they are multi threaded.

    2.They too can be executed just once or in an infinite loop until manually stopped.

    3.Services are controlled using an application called TSA.SERVICE

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    5/27

    1 A service must be multi threaded, otherwise it must be run as a phantom. A multi threadedrout ne cons sts o t e o owng components. rout ne to oa common var a esused in the subroutine, a SELECT routine to select the Ids to be processed, a record routinewhich contains the logic to process each id selected and finally an insert file defined for theroutine.

    2 Each multi threaded routine in T24 must have a PGM.FILE entry with TYPE = B whichstands for BATCH.

    3 Each B type routine has an entry in the BATCH application, and a service is no different. Aservice could be made up of one multi threaded routine or multiple routines that must be runin an order. You will use the BATCH record to define this order using the JOB field. TheBATCH record that you will create will NOT have a BATCH.STAGE defined as this recordmust NOT be picked up during COB.

    4 Finally, you must create a record in the application TSA.SERVICE. The ID of the recordmust match the BATCH record Id. Why is this? This is because when you start off a

    service, T24 looks for a record in the BATCH application and then finds out which routine itmust execute in the background.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    6/27

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    7/27

    TSA.SERVICE is the application where all services are defined and controlled by the enduser.

    ID: The id of the service record must match a record in the BATCH application.

    DESCRIPTION : This field holds the description of what the service is used for.SERVER NAME : This field holds the IP address or the host name of the server where thecurrent service needs to be executed. This will be used on in a multi application serverarchitecture.

    The whole idea behind a service is that you will have multiple copies of the process runningso that the load can be shared. How many such copies do you want running? That is definedin the field WORK PROFILE. This field holds the ID of the record inTSA.WORKLOAD.PROFILE application which defines the number of copies that willactually execute.

    USER : This field should hold a valid T24 user name, whose details are used to update theaudit fields of records that get created or updated by the service.

    SERVICE CONTROL : This field can hold three values AUTO, START and STOP. STOPcan be set in this field to stop the service when it is executing.

    You will learn about the other fields in the next few slides.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    8/27

    1. With the advent of multi threading in T24, two new programs (they are not subroutines)ave een co e to execute servces. ey are t an t .

    2. tSM is stands for T24 Service Manager and tSA stands for T24 Service Agent

    3. The tSA program is in charge of actually executing the service(s). Each copy of theprogram executed, in turn executes one copy of the assigned service.

    4. Since multiple copies of the tSA program can execute only ONE tSM program executesto take care of the entire situation.

    You will now see how a service is executed so that this slide makes more sense.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    9/27

    You must first turn the service on using the SERVICE.CONTROL field in TSA.SERVICE.s c ange must e aut or se . ou must remem er t at t s act on oes not start o t e

    service in the background. Its only a flag to say that the service will be picked up andexecuted.

    You must then start the tSM program. This can be done only from the jBASE prompt. Thiswill cause all service records with either START or AUTO to be picked up to be started.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    10/27

    Start the tSM by using START.TSM at the jBASE shell prompt. You have two options whenstart ng t e t to start t n mo e or to eave out t e opt on.

    The DEBUG option allows you to manually start tSAs to execute your service. In the screenshot above, OFS.MESSAGE.SERVICE has one tSA assigned to it, but SWIFT.OUT has

    two. How is this possible?

    When defining a service in TSA.SERVICE, the field WORK.PROFILE links to an applicationTSA.WORKLOAD.PROFILE where you can define how many tSAs are required. Each tSArepresents one copy of your multi threaded service being executed.

    Now in the screen shot above, you must understand that the services have not been startedas yet.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    11/27

    TSA.WORKLOAD.PROFILE is the application which defines the number of tSAs required..

    The number of agents in TSA.WORKLOAD.PROFILE can be set based on time if required.

    TIME and AGENTS.REQUIRED : These fields are associated multi value set which holdsthe specific time and the number of agents required at that point in time.

    The number of agents that can run on server is directly proportional to the number ofprocessors available. Just because T24 supports multi threaded services doesnt mean youcan start a 100 tSAs in the background. It will kill the server. The thumb rule to be followedis a maximum or 2 tSAs per processor available.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    12/27

    After the agents are assigned jobs, in DEBUG mode, type tSA at thes e prompt to actua y start t e agents to t e serv ce. ter t e o s n s e

    successfully, a message Agent Stopped will be displayed and the cursor will go back tojBASE shell prompt.

    When a service stops, the field SERVICE.CONTROL is set to STOP automatically.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    13/27

    Services can be configured as a periodic activity using the FREQUENCY field. This fieldo s a va ue n t e ormat

    Date Time Frequency- where,

    Date is the system date which is entered in T24 date format

    Time is entered in the format HH:MM(T24 hour format)

    Frequency is entered in the format 1D,2D etc.,

    EXAMPLE : 20100215 14:00 1D

    TSM would normally build the service profile only for the services which are set to START orAUTO. But when the frequency is specified for the service and SERVICE.CONTROL is setas STOP, the TSM would check whether the specified frequency has been reached takinginto account the time as well as frequency and would start the service. When the service isstopped, the frequency would be cycled to the next date. This field is not allowed for anAUTO service. The service control cannot be changed if the frequency is present. This ismostly using for archiving.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    14/27

    1. To configure services as a periodic activity, input a date, time and frequency when theserv ce as to e starte n t e correspon ng . recor . ote t at t e serv cecontrol for the service PW.MAPPING is set to stop. The frequency configured forPW.MAPPING service is 20100216 11:35. The TSM has been started in interactive mode.The time when the TSM is started is 11:32 on 16th Feb.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    15/27

    TSM builds the service profile for all services with service control set to STOP and whichave a set. nce t e t me as spec e n t e requency e o t e serv ce

    has been reached, TSM automatically sets the service control for the service to START andprompts the user to launch the required agents for the service(in DEBUG mode). Once theservice has stopped, the service control for the service is set back to STOP and theFREQUENCY gets cycled.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    16/27

    After the agents actually start performing the service, if you wish you have a look at thestatus o t e agents, an app cat on . can e use . you st t s app cat on, athe services that are to be executed by the agents will be displayed. The ID of the record inthis will be the agent number.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    17/27

    You know tSM launches and controls the tSAs. How does an end user know what isappen ng w t t e t s se t e enqu ry .

    Agent ID is the allocated Agent Number for the service

    T24.SESSION.NO is updated with a unique number that identifies every session in T24. Anumber between 1 -99999 is allocated when a session is started in a port to uniquely identifythat particular session in T24(both for online and COB).

    Note: This random number is generated using a routine calledEB.ALLOCATE.SESSION.NUMBER and is stored in a common variable calledC$T24.SESSION.NO. This helps in improving the monitoring capabilities of T24.

    A live file called T24.SESSION gets updated with record key being the T24.SESSION.NOand contains information regarding the agent to which this session number was assigned. Arecord in this application gets deleted, when the corresponding process terminates(sessionexpires).

    Server Name is the name of the server where the agent is running. Note that details of tSAsand tSMs across application servers will be updated here

    COB1.Close Of Business - Introduction-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    18/27

    Slide 17

    s1 The AGENT.STATUS enquiry output has been split into three screen shots as it elapses the screen. Someof the fields are explained in this slide and the remaining are explained in the next slide.salamelu, 2010/02/23

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    19/27

    Agent Status is the status of the agent. It can hold either of the three values.

    RUNNING Agent performing the job

    STOPPED Agent has stopped properly.

    DEAD Agent did not report within the time given and hence the tSM has marked the

    agent as DEAD

    Process Id is the Operating system level process ID for the agent process that is running

    Current Service is the service the agent is performing at the moment. Note agent 1 isperforming the service TSM and the others are performing the service COB

    Next Service is the service the agent is supposed to perform next. While COB is running, ifyou wish to stop COB, set the field SERVICE.CONTROL to STOP for the record COB in theTSA.SERVICE file. Then, check the NEXT.SERVICE value for the agents running COB, itwill be set to STOP denoting that the agents needs to stop once they complete the current

    transaction

    Job Progress is the status of the jobs being performed. Details of the status is not in thescope of this learning unit.

    COB1.Close Of Business - Introduction-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    20/27

    Slide 18

    s2 This slide is hidden in the slide show, it is present only for the notes page informationsalamelu, 2010/02/23

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    21/27

    Last Message is the message displayed by the agents as they are performing the jobs. Theagent runn ng t w not sp ay any message as t s ust mon tor ng agents.

    Como Name is the name of the log record ID that holds the log information of the agent.These log records are stored in a directory called &COMO&. The contents of these records

    cannot be viewed from browser. You will have to open these records at the jBASE prompt.The log file name is in the format tSA___

    LAST.MESSAGE is the message displayed by the agents as they are performing the jobs.The agent running tSM will not display any message as it is just monitoring agents.

    COMO.NAME holds the name of the log file that has the log information of the particularagent.

    JOB.PROGRESS holds the status of the jobs being performed.

    COB1.Close Of Business - Introduction-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    22/27

    COMO.NAME in AGENT.STATUS holds the name of the log file. Log files are stored under . .

    command JED &COMO& to view the contents of the log file.

    If an agent is restarted, there will be two log files for that agent as the log file ID is based ondate and time. Log files do not get cleared automatically from the &COMO&.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    23/27

    When multiple application servers are part on the T24 architecture, all processors can bema e use o w en execut ng serv ces. ne t must e starte on eac server an t etSAs started appropriately.

    You must remember that data resides centrally so in the TSA.SERVICE record, you will

    need to specify a workload profile for each server and also mention the server names in thecorresponding multi-value fields.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    24/27

    1. An activation file is a file in the backend that contains all the IDs to be processed by theserv ce. nce an s processe rom t e act vat on e, t s remove rom t ere

    2. Since we have populated the file with the ids that the service needs to process, there isno need for a SELECT routine separately

    3. For a service to use an activation file, it should be mentioned in the PGM.FILE entry forthe job that is running as a service. The field Activation File should be set to YES orthe name of the activation file. If you choose the option as yes, then the name of theactivation file will be F..LIST

    For eg: BNK/SWIFT.OUT, runs DE.OUTWARD job as a service. Now, as you can seein the screenshot, the field ACTIVATION.FILE has been set to yes.

    Q. Based on what you learnt just now, what would be the name of the activation file?

    A. F.SWIFT.OUT.LIST (the BNK part is not included)

    NOTE: When you start a service by setting the SERVICE.CONTROL field to START inthe TSA.SERVICE record of that service, you would expect the service to run once andthen stop. This is not the case for services having activation files. When a particularservice has an activation file, it keeps running even if the SERVICE.CONTROL field isset to START.

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    25/27

    1. FALSE Single Threaded mode

    2. FALSE Each server should have one tSM running

    3. TRUE

    4. FALSE TSA.STATUS

    5. TRUE

    6. FALSE TSA.STATUS

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    26/27

    You will now be able to:

    Differentiate between Phantoms and Services

    Explain the working of Services in T24

    SER1.Services In T24-R10.01

  • 8/11/2019 A_SER1[1].Services In T24-R10.01.pdf

    27/27