× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

Trade Authorization time increase

  • ariz1234
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 3 days ago #23979 by ariz1234
Trade Authorization time increase was created by ariz1234
Dear All,

we have single threaded routine which authorize trade(MF.TRADE) records daily more than 12000 records. Before 1 month it authorize record 50 Trades per minutes and its total time for 12000 trades not more than 4 hours. but now its time increases and only authorize 35 trades per minute and total time more than 6 hours. 

Is there anyone help me where is the issue either we have to release records from any logs or other.

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • TAFC/J|R19/R22
More
3 weeks 3 days ago #23980 by VK
Replied by VK on topic Trade Authorization time increase
Hi
which database you have? jBASE or RDBMS?
 

Cheers
VK

Please Log in or Create an account to join the conversation.

  • ariz1234
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 3 days ago #23981 by ariz1234
Replied by ariz1234 on topic Trade Authorization time increase
jBASE

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • TAFC/J|R19/R22
More
3 weeks 3 days ago #23982 by VK
Replied by VK on topic Trade Authorization time increase
Hi
if the target file has type J4 - check the sizing; resize if necessary.

Cheers
VK

Please Log in or Create an account to join the conversation.

  • ariz1234
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 2 days ago #23984 by ariz1234
Replied by ariz1234 on topic Trade Authorization time increase
Thank You for your response.

Can you please explain more about target file below is my mainline routine.

*
* <Rating>-56</Rating>
*

SUBROUTINE PK.MF.DIARY.CASH.MDIP.D.TRD

$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.MF.TRADE
$INSERT I_F.PK.L.SECURITY.POSITION
$INSERT I_F.SECURITY.MASTER

GOSUB INIT
GOSUB OPEN.FILES
GOSUB PROCESS

RETURN

*
*
INIT:
*----*


FN.PK.L.SECURITY.POSITION = "F.PK.L.SECURITY.POSITION"
F.PK.L.SECURITY.POSITION = ""

FN.SECURITY.MASTER = "F.SECURITY.MASTER"
F.SECURITY.MASTER = ""


OFS.TYPE = "BULKOFS"

RETURN
*
*
OPEN.FILES:
*
*

CALL OPF(FN.PK.L.SECURITY.POSITION,F.PK.L.SECURITY.POSITION)
CALL OPF(FN.SECURITY.MASTER,F.SECURITY.MASTER)

RETURN

*
*
PROCESS:
*
*

CALL F.READ(FN.SECURITY.MASTER,'800145-100',R.SECURITY.MASTER,F.SECURITY.MASTER,SEC.MASTER.ERROR.2)
Y.DIVD.RATE = R.SECURITY.MASTER<SC.SCM.LOCAL.REF,L.DIVD.RATE.POS> ; * MDIP Dividend Rate

SEL.SEC.POS.CMD = "SELECT ": FN.PK.L.SECURITY.POSITION: " WITH @ID LIKE '...800145-100...' AND CLOSING.BAL.NO.NOM GT '1' AND RESERVED.1 NE ":TODAY

CALL EB.READLIST(SEL.SEC.POS.CMD,SP.LIST,'',TOT.SP.REC,SP.ERROR.1)
FOR I.SP = 1 TO TOT.SP.REC

Y.SP.ID = SP.LIST<I.SP>

Y.PORT.ID = FIELD(Y.SP.ID,".",1)
Y.FUN.ID = FIELD(Y.SP.ID,".",2)
Y.TYPE.ID = FIELD(Y.SP.ID,".",3)

CALL F.READ(FN.PK.L.SECURITY.POSITION,Y.SP.ID,R.SP,F.PK.L.SECURITY.POSITION,SP.ERROR.2)

Y.CLOSING.BAL.NO.NOM = R.SP<MF.SC.SCP.CLOSING.BAL.NO.NOM> ; * Total Units
Y.COST.INVST.SEC.CCY = R.SP<MF.SC.SCP.COST.INVST.SEC.CCY> ; * Initial Cost
Y.RLZ.MRK.GN.CUR.PTF = R.SP<MF.SC.SCP.RLZ.MRK.GN.CUR.PTF> ; * Realized Gain
Y.DATE.LAST.TRADED = R.SP<MF.SC.SCP.DATE.LAST.TRADED> ; * Date Last Traded

Y.SC.QUALIFY.HLDG = R.SP<MF.SC.SCP.CLOSING.BAL.NO.NOM>

Y.TRNAS.TYPE = "FPG"
Y.DIVD.TYPE = "R"
Y.TAX.PAY.CODE = "16"

Y.TRANS.AMOUNT = Y.CLOSING.BAL.NO.NOM * Y.DIVD.RATE

Y.CUSTOMER.ID = FIELD(Y.PORT.ID,"-",1)
OFS.MSG = "MF.TRADE,PK.INP.OFS.CASH.MRAF/I/VALIDATE,//":ID.COMPANY:"/,"
OFS.MSG := ",FUND.ID::=" :Y.FUN.ID
OFS.MSG := ",CUSTOMER.ID::=" :Y.CUSTOMER.ID
OFS.MSG := ",PARTICIPATION.ACC::=" :Y.PORT.ID
OFS.MSG := ",TRANS.AMOUNT::=" :DROUND(Y.TRANS.AMOUNT,2)
OFS.MSG := ",AGENT::=" :Y.TYPE.ID
OFS.MSG := ",TRANS.TYPE::=" :Y.TRNAS.TYPE
OFS.MSG := ",DIVD.TYPE::=" :Y.DIVD.TYPE
OFS.MSG := ",TAX.PAY.CODE::=" :Y.TAX.PAY.CODE
OFS.MSG := ",QUALIFY.HOLDING::=" :Y.SC.QUALIFY.HLDG

CALL OFS.GLOBUS.MANAGER(OFS.TYPE,OFS.MSG)

Y.MF.TRADE.ID = FIELD(OFS.MSG,"/",1)

Y.TOT.LEN.MSG = LEN(OFS.MSG)
Y.LEN.MSG = LEN(FIELD (OFS.MSG,",",1))
Y.LEN.MSG = Y.LEN.MSG + 1
Y.NEW.OFS.MSG = "MF.TRADE,PK.INP.MON.OFS.3/I/PROCESS,//":ID.COMPANY:"/,":Y.MF.TRADE.ID
Y.NEW.OFS.MSG := OFS.MSG[Y.LEN.MSG,Y.TOT.LEN.MSG]

CALL OFS.GLOBUS.MANAGER(OFS.TYPE,Y.NEW.OFS.MSG)

NEXT I.SP
RETURN
END

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • TAFC/J|R19/R22
More
3 weeks 2 days ago #23986 by VK
Replied by VK on topic Trade Authorization time increase
Hi
under "target file" I meant the application file where you issue an OFS message - in your case it's MF.TRADE.

BTW, why you issue OFS 2 times? Probably the "VALIDATE" one is to get an @ID? (because you don't check if there were any errors).

You can skip the @ID in "PROCESS" OFS message and it will assign it automatically (so you don't need "VALIDATE" one).

Also you might check F.OFS.REQUEST.DETAIL to see if it's sized properly.

Finally, you can take out of the loop the following assignments:
Y.TRNAS.TYPE = "FPG"
Y.DIVD.TYPE = "R"
Y.TAX.PAY.CODE = "16"


 

Cheers
VK

Please Log in or Create an account to join the conversation.

  • ariz1234
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 6 days ago #23987 by ariz1234
Replied by ariz1234 on topic Trade Authorization time increase
We have checked and below count received can i clear it?

jsh r8am ~ -->COUNT F.OFS.REQUEST.DETAIL

508332905 Records counted

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • TAFC/J|R19/R22
More
2 weeks 6 days ago #23988 by VK
Replied by VK on topic Trade Authorization time increase
Hi
this is a sort of "OFS protocol" that might be necessary to look into if you had some OFS errors... You can clear it on daily basis or even switch off in OFS.SOURCE (it will increase the speed but to see why some OFS failed would be not so easy).

Cheers
VK

Please Log in or Create an account to join the conversation.

Time to create page: 0.121 seconds