T24:Posting transaction using OFS.POST.MESSAGE

7,399 views
Skip to first unread message

ankit

unread,
Jul 1, 2010, 7:56:07 PM7/1/10
to jBASE
Hi All,

I am posting transaction from a main line program that runs as a
service every 60 seconds using OFS.POST.MESSAGE.

Syntax:
CALL
OFS.POST.MESSAGE(OFS.MSG,OFS.MSG.ID,'GENERIC.OFS.PROCESS',OPTIONS)

My problem is that, after I call OFS.POST.MESSAGE. I can't read the
record from file
OFS.RESPONSE.QUEUE using the id returned in OFS.MSG.ID. The record is
somehow deleted. I want to read the record to check if the transaction
went through or not.

NOTE that the OFS.RESPONSE.QUEUE service is not set to purge the
records from the queue.

Any help would be appreciated.

Ankit Patel.

Mohankumar Balasubramaniam

unread,
Jul 2, 2010, 8:08:46 AM7/2/10
to jb...@googlegroups.com
Hi,

Can you check whether OFS.MESSAGE.SERVICE is running in AUTO?
Then only you message will be processed from OFS.MESSAGE.QUEUE.

Regards,
Mohan


--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24

To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Ankit Patel

unread,
Jul 2, 2010, 7:59:10 AM7/2/10
to jBASE
Hi All,

Note that I am reading the response from the same program that is posting the transaction using OFS.POST.MESSAGE. Does anyone know other way to know if the transaction went through from the same program or any other way to pass transactions using OFS.

I am using R08

Tnx,
Ankit.

Ankit Patel

unread,
Jul 2, 2010, 12:54:00 PM7/2/10
to jb...@googlegroups.com
Hi Mohan,

My routine runs at COB and OFS.MESSAGE.SERVICE is running in AUTO. But as the cob runs in debug mode, have to manually launch OFS.MESSAGE.SERVICE after COB finishes. My problem is I need to charge customer's. So I need to check if OFS was successful or not from the same routine that is sending the OFS message.

Tnx,
Ankit Patel

Santosh

unread,
Jul 2, 2010, 6:53:52 PM7/2/10
to jb...@googlegroups.com
Why dont you use OFS.GLOBUS.MANAGER (Just validate dont use for process).....and see whether response is ok or not....if its successful then call your OFS.POST.MESSAGE otherwise incase of error whatever you are doing you can handle it....
Mobile: 973-39406098

"Nobody can go back and start a new beginning, but anyone can start today and make a new ending"

Pratosh

unread,
Jul 2, 2010, 5:56:54 PM7/2/10
to jBASE
Hi Ankit,
The ID returned by the call to OFS.POST.MESSAGE is not the ID you can
read directly from the F.OFS.RESPONSE.QUEUE. Usually a ".1" is
appended to the ID and is written to the response queue

The following example should help

Y.OFS.MSG = "Blah blah blah"
Y.OFS.SOURCE = "ONLINE"
CALL OFS.POST.MESSAGE(Y.OFS.MSG,Y.OFS.MSG.KEY,Y.OFS.SRC,"")

Suppose the key returned is
Y.OFS.MSG.KEY : 155240020360380.00


A list on F.OFS.MESSAGE.QUEUE gives the following result:

LIST F.OFS.MESSAGE.QUEUE
@ID.......

155240020360380.00-ONLINE

1 Records Listed


Once the record is processed by the OFS.MESSAGE.SERVICE, a list on
F.OFS.RESPONSE.QUEUE gives you the ID of the record which contains the
response. But as you can see, it is not the same as returned by
OFS.POST.MESSAGE

LIST F.OFS.RESPONSE.QUEUE WITH @ID LIKE 155240020360380.00...
@ID.......

155240020360380.00.1

1 Records Listed


I hope it helps.

Cheers
Pratosh

Pawel (privately)

unread,
Jul 2, 2010, 4:34:32 PM7/2/10
to jb...@googlegroups.com

Hi Ankit,

 

I think, that you are not thinking right.

 

OFS.POST.MESSAGE is a T24 function to perform OFS in the background, outside your current transaction. You can not really control its results in a synchronoous way. There is a (request) queue which is written by various (not only yours) processes. Queue like a queue - may be unpredictable long.

 

What you are facing is likely "unprocessed" request. You write it quickly to queue, but you do not have answer in response queue yet. Put SLEEP 180 after OFS.POST.MESSAGE call and likely your program will start working ;) :)))) But do not tell to people please, that I asked you to do.

 

Please redesign your process. You may do few things to treat OFS.POST.MESSAGE in a "synchronous" way, but remember that it will be cheating yourself.

 

Kind regards

Pawel

 

Dnia 2-07-2010 o godz. 18:54 Ankit Patel napisaďż˝(a):

Sudhakar-"Dare to Bare"

unread,
Jul 3, 2010, 10:34:43 PM7/3/10
to jb...@googlegroups.com
Hi,

  If you're using OFS.GLOBUS.MANAGER, your response will be stored in the OFS.MSG argument.

   If you want to to identify the message you're getting through your request, In OFS.SOURCE you're using in the program, you have to use the USE.PREFIX field. So that all the request's and responses coming through the OFS.SOURCE will be prefixed with the name you gave in OFS.SOURCE application.

Regards,
Sudhakar   

Ankit Patel

unread,
Jul 6, 2010, 5:15:15 AM7/6/10
to jb...@googlegroups.com
@Sudhakar I am not using OFS.GLOBUS.MANAGER

@Pawel : I just wanted to know if der is any other way to charge customer accounts at COB. I don't want to write two routines to do it. I get what you are trying to say but I was looking for a simpler solution. Anyways, tnx

Thank You,
Ankit Patel

Mohankumar Balasubramaniam

unread,
Jul 6, 2010, 8:19:51 AM7/6/10
to jb...@googlegroups.com
Hi,
 
If you want to chanrge customers in COB, then you can write a charge routine which can be attachable in FT.COMMISSION.TYPE. Then you can define IC.CHARGE.PRODUCT, and IC.CHARGE. So that during IC.COB these charges will be applied for group of accounts for which you defined. For example please see below.
 
FT.COMMISSION.TYPE:
==================
 
    COMMISSION.TYPE... ADVMAINTFEE
 ---------------------------------------------------------------------
   1. 1 GB DESCRIPTION. Maintenance Fees Advantage Banking
   2. 1 GB SHORT.DESCR. Maint Fees
   4 CATEGORY.ACCOUNT.. 52039               Ledger Fees
   5 TXN.CODE.CR....... 334                 Maint Chrg
   6 TXN.CODE.DR....... 337                 Maint Chrg
   9. 1 CURRENCY....... KES                 Kenya Shillings
  10. 1 FLAT.AMT....... 1,200.00
  11. 1. 1 CALC.TYPE... FLAT
  22 MTHLY.AMORTISATION NO
  33 DEFAULT.CCY....... KES                 Kenya Shillings
  41 CURR.NO........... 5
 Next you need to define IC.CHARGE.PRODUCT. please see below.
 
 KCB HEADOFFICE - LIVE   IC.CHARGE.PRODUCT SEE
     IC.CHARGE.PRODUCT. ADVMAINTFEE
 ------------------------------------------------------------------------------
   1. 1 GB DESCRIPTION. Advantage Banking
   2 GEN.CHARGE.KEY.... ADVMAINTFEE         Maintenance Fees Advantage Banking
  17 CURR.NO........... 2
  18. 1 INPUTTER....... 22_ZANELE1
 
The field GEN.CHARGE.KEY should be the FT.COMMISSION.TYPE id.
 
then you need to define IC.CHARGE for specific group of accounts as below.
 
 KCB HEADOFFICE - LIVE   IC.CHARGE SEE
     IC.CHARGE.ID...... G-715
 ------------------------------------------------------------------------------
   1. 1 IC.CHG.PRODUCT. ADVMAINTFEE         Advantage Banking
   2. 1 CAL.STEP.PERIOD M
   3. 1 CHRG.FREQUENCY. 20091031M0131       31 OCT 2009 Monthly on the last da|
   4. 1 CHRG.EFF.DATE.. 23 JAN 2008
  19 CURR.NO........... 4
  20. 1 INPUTTER....... 22_PARFAIT2
Here for account group 715 these charges will be applied according to the frequency mentioned in IC.CHARGE during IC.COB.
I hope this will help you to charge the customer.
 
Regards,
Mohan

Srinivas

unread,
Jul 6, 2010, 1:07:49 PM7/6/10
to jb...@googlegroups.com

Dear ,
 
Simple Solution is to Raise one time Standing Order Instruction with the frequency as required  for the required accounts, if  the charge amount is fixed.
 
It gets executed until it reaches the end of the Frequency.
 
Setup explained by Mr Mohan is also OK.
Regards,

SrinivasYadav. G
Mobile No: 00966 - 540625165

Ankit Patel

unread,
Jul 8, 2010, 7:52:32 AM7/8/10
to jb...@googlegroups.com
@Srinvas, Mohan

Charges are not fixed, it may vary on the number of SMS sent to a client. Anyways, thank you all for you suggestions.... it looks like i'll have to write two routines.

Thank You,
Ankit.
Reply all
Reply to author
Forward
0 new messages