OFS.MESSAGE.SERVICE
OFS.MESSAGE.SERVICE:
OFS.MESSAGE.SERVICE is a standard T24 service with its own workload profile. Ensure that the OFS.MESSAGE.SERVICE is started by committing the TSA.SERVICE record. OFS message should get written on to a file named F.OFS.MESSAGE.QUEUE. This is the IN queue from where the service OFS.MESSAGE.SERVICE picks up the data and processes.
Once the message is processed, the response is written on to an out queue named F.OFS.RESPONSE.QUEUE.
The service OFS.MESSAGE.SERVICE is a multi threaded service and needs to be started like any other service. It also requires the tSM to be up and running. The SERVICE.CONTROL field of OFS.MESSAGE.SERVICE record in TSA.SERVICE application can be set to AUTO, so that whenever the new messages comes it will process it and stop the service till next message comes.
OFS.MESSAGE.SERVICE needs the below 4 entries, 1)
PGM.FILE
2)
TSA.SERVICE
3)
BATCH
4)
WORKLOAD PROFILE
PGM.FILE:
TSA.SERVICE:
BATCH ENTRY:
Sample workload profile:
An API called OFS.POST.MESSAGE has been introduced to facilitate inter-application OFS calls. OFS.POST.MESSAGE Syntax:
OFS.POST.MESSAGE(Y.OFS.MESSAGE, OFS.MSG.ID, OFS.SOURCE.ID, OPTIONS) Explanation:
•
Application name, record id and field information's will be passed through the first argument Y.OFS.MESSAGE
•
OFS.SOURCE.ID must be the id of a record in OFS.SOURCE with type GLOBUS
•
OPTIONS is the fourth argument, which contains the "USER ID" need to be used to process that transaction.
Here, if we give the user id in the fourth argument then that user will be taken for processing. Ex:- CALL OFS.POST.MESSAGE(OFS.MSG,OFS.MSG.ID,OFS.SOURCE,"USER.1") The new format of ID of F.OFS.MESSAGE.QUEUE will be -- If the USER part is left blank then the USER specified in the USER field of TSA.SERVICE record OFS.MESSAGE.SERVICE will be taken in account for processing the transactions and from the OFS.SOURCE. Ex:- CALL OFS.POST.MESSAGE(OFS.MSG,OFS.MSG.ID,OFS.SOURCE,'')
Note:- The "USER ID" mentioned in the OFS message won't be taken for consideration, based on the fourth argument only the user id will be decided.
Note: From the information received, we understand that the requirement is to process the OFS requests from each bank should be processed separately. Using this fourth argument you can set up the specific user to process the request from each bank and you can also set up the specific OFS.SOURCE for each bank. Hence with help of the fourth argument you achieve the requirement.
Sample procedure for implementing OFS.MESSAGE.SERVICE:
Step1:
Write a routine to post the OFS message into the F.OFS.MESSAGE.QUEUE. SUBROUTINE POST.RTN $INSERT I_COMMON $INSERT I_EQUATE Y.STR = ”SECTOR,/I/PROCESS,AUTHOR/123123,1003,DESCRIPTION::=All Employees, SHORT.NAME::=Staff” Y.SRC = “GLOBUS” OPTIONS = ‘’
CALL OFS.POST.MESSAGE(Y.STR,MSG.ID,Y.SRC,OPTIONS) CALL JOURNAL.UPDATE(“”)
RETURN END
If the local routine is run as a mainline then the JOURNAL.UPDATE should be invoked. Whereas it is invoked from any version routine or any service then JOURNAL.UPDATE shouldn’t be invoked.
Step 2:
Setup the OFS.SOURCE record
Step 3:
Run the local routine as mainline or service.
Step 4:
After running the local routine post the OFS request into the F.OFS.MESSAGE.QUEUE. Ex:
Here F.OFS.MESSAGE.QUEUE id is : 163850000142053.00-GLOBUS (Where GLOBUS is the OFS.SOURCE record.)
Step 5:
Start the TSM.
Step 6:
Run the agent tSA 2. jsh corstj7 ~ -->tSA 2 tSA 2 Agent 2 started 09 NOV 12 12-07-36 Agent's Process id 8978488 Running on server maa1pacsax2 PortNumber 2 _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:39_Standard multi-thread job _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:39_Calling load routine _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:39_Starting job _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:42_Allocating List File for OFS.MESSAGE.SERVICE-OFS.MESSAGE.SERVICE-1 _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:42_Updating the Locking with OFS.MESSAGE.SERVICE-OFS.MESSAGE.SERVICE-1 and F.JOB.LIST.2 _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:44_Calling..OFS.MESSAGE.SERVICE.SELECT _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:44_List starting from 0 keys processed so far 0
_OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:44_Building from driving file _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:44_Control list.. _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:45_Processing...1 Offset...0 Number of sessions...6 Source changed to /glopacs1/corstj7/TestBase/TestBase.run/R085890.SOURCE/BATCH.JOB.CONTROL _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:07:50_SELECT F.JOB.LIST.2 SAMPLE 100000 Selected=0 time=0secs _OFS.MESSAGE.SERVICE_OFS.MESSAGE.SERVICE_2_09 NOV 2012_12:08:03_Complete_43659_43683_00:00:24_1 Agent stopped
Step 7:
Now the response will be updated in the F.OFS.RESPONSE.QUEUE.
jsh corstj7 ~ -->CT F.OFS.RESPONSE.QUEUE 163850000142053.00.1 001 1 002 DESCRIPTION:1:1=SDFG,SHORT.NAME:1:1=SDFG,RECORD.STATUS:1:1=INAU,CURR.NO:1: 1=1,INPUTTER:1:1=42_INPUTTER__OFS_GLOBUS,DATE.TIME:1:1=1211090655,CO.CODE: 1:1=GB0010001,DEPT.CODE:1:1=1 003 1003 1st position represents the success or failure of the OFS 2nd position is the response message 3rd position represents the record id of the transaction.
OFS.RESPONSE.QUEUE
A second service, OFS.RESPONSE.QUEUE, purges the OFS.RESPONSE.QUEUE file according to the minutes entered into the ATTRIBUTE.VALUE field on the TSA.SERVICE record. If a record is older than the time in ATTRIBUTE.VALUE,it will be deleted.
Fig 28: TSA.SERVICE entry for OFS.RESPONSE.QUEUE
•
The ATTRIBUTE.TYPE and ATTRIBUTE.VALUE fields are not validated as they are free form fields to be used by TSA.SERVICE records to contain any value that a service may require.
•
For OFS.RESPONSE.QUEUE, the duration (in minutes) is entered into the ATTRIBUTE.VALUE field. If a numeric value is not entered into this field, records will not be purged from the OFS.RESPONSE.QUEUE file when this service is run.
This service has a workload profile similar to that of OFS.MESSAGE.SERVICE. A sample profile is shown below
Fig 29: TSA.WORKLOAD.PROFILE entry for OFS.RESPONSE.QUEUE Hope this document clarifies your query.