×
Discuss about Archiving, Close of Business, Delivery Setup, Security Management System, Global Processing etc…
Writing data in MF.TRADE by using input routine
- assiddiqui
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 0
9 years 7 months ago - 9 years 7 months ago #16308
by assiddiqui
Writing data in MF.TRADE by using input routine was created by assiddiqui
i am trying to write an input routine which would be call from MF.TRADE version and writes data in the specific field by reading its respective MF.ORDER id .
Basically the issue is that some MF.ORDER are in Live File and some are in HISTORY and i have to check condition for both of the cases whether the MF.ORDER is present in LIVE file or in HISTORY.
i am unable to write the routine. Can somebody explain??
Basically the issue is that some MF.ORDER are in Live File and some are in HISTORY and i have to check condition for both of the cases whether the MF.ORDER is present in LIVE file or in HISTORY.
i am unable to write the routine. Can somebody explain??
Last edit: 9 years 7 months ago by assiddiqui.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
Less
More
- Posts: 2854
- Thank you received: 649
9 years 7 months ago - 9 years 7 months ago #16311
by jpb
Replied by jpb on topic Writing data in MF.TRADE by using input routine
READ R.MFO FROM F.MF.ORDER,MF.ORDER.NO ELSE
CALL EB.READ.HISTORY.REC(F.MF.ORDER$HIS,MF.ORDER.NO,R.MFO,READ.ERROR)
MF.ORDER.ID = FIELD(MF.ORDER.ID,';',1) ;* EB.READ.HISTORY returns the ID with ;nn
...
END
Last edit: 9 years 7 months ago by jpb.
Please Log in or Create an account to join the conversation.
- assiddiqui
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 0
9 years 7 months ago #16312
by assiddiqui
Replied by assiddiqui on topic Writing data in MF.TRADE by using input routine
Please check the attached routine which i use. Its gives error like below:
jBASE debugger->C
** Error [ NOT_FILE_VAR ] **
Variable is not an opened file descriptor ,
Var (UNKNOWN) , Line 119 , Source F.READ
Trap from an error message, error message name = NOT_FILE
Line 119 , Source F.READ
jBASE debugger->C
** Error [ NOT_FILE_VAR ] **
Variable is not an opened file descriptor ,
Var (UNKNOWN) , Line 119 , Source F.READ
Trap from an error message, error message name = NOT_FILE
Line 119 , Source F.READ
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
Less
More
- Posts: 2854
- Thank you received: 649
9 years 7 months ago #16314
by jpb
Replied by jpb on topic Writing data in MF.TRADE by using input routine
FN.MF.ORDER.HIS = "F.MF.ORDER$HIS"
FP.MF.ORDER.HIS = ""
CALL OPF(FN.MF.ORDER.HIS,FP.MF.ORDER.HIS)
CALL F.READ(FN.MF.ORDER.HIS,J.ORD,R.MF.ORDER,F.MF.ORDER.HIS,ORD.ERROR)
FP.MF.ORDER.HIS = ""
CALL OPF(FN.MF.ORDER.HIS,FP.MF.ORDER.HIS)
CALL F.READ(FN.MF.ORDER.HIS,J.ORD,R.MF.ORDER,F.MF.ORDER.HIS,ORD.ERROR)
Please Log in or Create an account to join the conversation.
- assiddiqui
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 0
9 years 7 months ago #16315
by assiddiqui
Replied by assiddiqui on topic Writing data in MF.TRADE by using input routine
Thankyou jpb,
i have made changes now it will read the string but not passing values in the fields and gives below error when reading the record from history. Please find attached error
msg.
i have made changes now it will read the string but not passing values in the fields and gives below error when reading the record from history. Please find attached error
msg.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
Less
More
- Posts: 2854
- Thank you received: 649
9 years 7 months ago - 9 years 7 months ago #16316
by jpb
Replied by jpb on topic Writing data in MF.TRADE by using input routine
FOR J = 1 TO TOT.REC.ORD
J.ORD = ORD.LIST<J>
CALL F.READ(FN.MF.ORDER.HIS,J.ORD,R.MF.ORDER.HIS,FP.MF.ORDER.HIS,ORD.ERROR)
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRU.TYPE.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.INSTRU.TYPE.POS,I>
I suppose you want to write to position J ...
J.ORD = ORD.LIST<J>
CALL F.READ(FN.MF.ORDER.HIS,J.ORD,R.MF.ORDER.HIS,FP.MF.ORDER.HIS,ORD.ERROR)
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRU.TYPE.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.INSTRU.TYPE.POS,I>
I suppose you want to write to position J ...
Last edit: 9 years 7 months ago by jpb.
Please Log in or Create an account to join the conversation.
- assiddiqui
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 0
9 years 7 months ago #16318
by assiddiqui
Replied by assiddiqui on topic Writing data in MF.TRADE by using input routine
I want to write the value in local field (i.e."L.INSTRU.TYPE") of MF.TRADE from the value present in MF.ORDER means that in MF.ORDER the local field "L.INSTRU.TYPE" has a value "ONLINE TRANSFER" and i want to write this value in the local field of MF.TRADE .
I hope you understand...
I hope you understand...
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
Less
More
- Posts: 2854
- Thank you received: 649
9 years 7 months ago #16320
by jpb
Replied by jpb on topic Writing data in MF.TRADE by using input routine
The problem is that you loop thru the found record using J pointer and within this loop you assign values using I pointer that you haven't set before. I assume it should be like this:
LAST.TRD.INST = 0
FOR J = 1 TO TOT.REC.ORD
J.ORD = ORD.LIST<J>
CALL F.READ(FN.MF.ORDER.HIS,J.ORD,R.MF.ORDER.HIS,FP.MF.ORDER.HIS,ORD.ERROR)
Y.TOT.INST = DCOUNT(R.MF.ORDER<MF.ORD.LOCAL.REF,ORD.L.INSTRU.TYPE.POS>,SM)
Y.TOT.INST += LAST.TRD.INST
START.POS = LAST.TRD.INST + 1
FOR I = START.POS TO Y.TOT.INST
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRU.TYPE.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.INSTRU.TYPE.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRUMNET.NO.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.INSTRUMNET.NO.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.BANK.NAME.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.BANK.NAME.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.BRANCH.NAME.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.BRANCH.NAME.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.CITY.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.CITY.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.DEPO.SLIP.NO.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.DEPO.SLIP.NO.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.P.LOCATION.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.CITY.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.CLEARING.DATE.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.CLEARING.DATE.POS,I>
LAST.TRD.INST = I
NEXT I
NEXT J
LAST.TRD.INST = 0
FOR J = 1 TO TOT.REC.ORD
J.ORD = ORD.LIST<J>
CALL F.READ(FN.MF.ORDER.HIS,J.ORD,R.MF.ORDER.HIS,FP.MF.ORDER.HIS,ORD.ERROR)
Y.TOT.INST = DCOUNT(R.MF.ORDER<MF.ORD.LOCAL.REF,ORD.L.INSTRU.TYPE.POS>,SM)
Y.TOT.INST += LAST.TRD.INST
START.POS = LAST.TRD.INST + 1
FOR I = START.POS TO Y.TOT.INST
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRU.TYPE.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.INSTRU.TYPE.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRUMNET.NO.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.INSTRUMNET.NO.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.BANK.NAME.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.BANK.NAME.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.BRANCH.NAME.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.BRANCH.NAME.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.CITY.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.CITY.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.DEPO.SLIP.NO.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.DEPO.SLIP.NO.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.P.LOCATION.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.CITY.POS,I>
R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.CLEARING.DATE.POS,I> = R.MF.ORDER.HIS<MF.ORD.LOCAL.REF,ORD.L.CLEARING.DATE.POS,I>
LAST.TRD.INST = I
NEXT I
NEXT J
Please Log in or Create an account to join the conversation.
- assiddiqui
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 0
9 years 7 months ago - 9 years 7 months ago #16322
by assiddiqui
Replied by assiddiqui on topic Writing data in MF.TRADE by using input routine
Thank you for your reply..!
I had made changes and assign the value 'J' to the position as you mentioned earlier but still not resolve, it has picked the whole string instead of the local field position value.
Please find attached snapshot
I had made changes and assign the value 'J' to the position as you mentioned earlier but still not resolve, it has picked the whole string instead of the local field position value.
Please find attached snapshot
Last edit: 9 years 7 months ago by assiddiqui.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
Less
More
- Posts: 2854
- Thank you received: 649
9 years 7 months ago #16323
by jpb
Replied by jpb on topic Writing data in MF.TRADE by using input routine
No, J is the pointer for the read history records, you should use I as shown above (and don't remove the I on line 141 ff. on the R.NEW side, e.g. R.NEW(MF.TRD.LOCAL.REF)<1,TRA.L.INSTRU.TYPE.POS,I>).
To display the content of your local field in debugger you have to use real numbers, it doesn't work with variables, e.g. R.MF.ORDER.HIS<20,1,1>
To display the content of your local field in debugger you have to use real numbers, it doesn't work with variables, e.g. R.MF.ORDER.HIS<20,1,1>
Please Log in or Create an account to join the conversation.
- assiddiqui
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 0
9 years 7 months ago #16327
by assiddiqui
Replied by assiddiqui on topic Writing data in MF.TRADE by using input routine
Done!
Thanks alot.
Thanks alot.
Please Log in or Create an account to join the conversation.
Time to create page: 0.245 seconds