F.WRITE not always working

More
11 years 9 months ago #13447 by Jo
F.WRITE not always working was created by Jo
Hi,

I need help for troubleshooting an issue. I have an Auth routine attached to a FT version.
It is supposed to update few fields in another table (e.g LOCAL.TABLE) and then Delete a record in a Concat table as below.

CALL F.READ('F.LOCAL.TABLE',Y.ID,R.LOCAL.TABLE,F.LOCAL.TABLE,E.PMT)
IF R.LOCAL.TABLE NE '' THEN
R.LOCAL.TABLE<FIELD1>=TIMEDATE()
R.LOCAL.TABLE<FIELD2>="PROCESSED"
R.LOCAL.TABLE<FIELD3>='PROCESSED'
CALL F.WRITE('F.LOCAL.TABLE',Y.ID,R.LOCAL.TABLE)
IF APPLICATION EQ 'FUNDS.TRANSFER' THEN
CALL F.DELETE('F.FT.CONCAT.TABLE',Y.ID)
END ELSE
CALL F.DELETE('F.STO.CONCAT.TABLE',Y.ID)
END
END

It happens that in some unknown cases the F.WRITE does not work...though F.DELETE was successful.
Since deletion in the concat table worked, we can deduce that the Routine was executed completely.

Has someone come across this issue? I have not been able to reproduce this case. Can it be a locking problem? Is there a solution?

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

More
11 years 9 months ago #13448 by jpb
Replied by jpb on topic F.WRITE not always working
Have you tried using F.READU on your LOCAL.TABLE (and also on your concat)?

You can't be sure "who is last" to update when you have multiple updaters without locking !

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

More
11 years 9 months ago #13459 by Jo
Replied by Jo on topic F.WRITE not always working
Thanks for your reply:) I have never used F.READU.
Is the code ok like that? F.DELETE in the concat table is working fine.

When writing to a file is it always necessary to use F.READU?

CALL F.READU('F.LOCAL.TABLE',Y.ID,R.LOCAL.TABLE,F.LOCAL.TABLE,E.PMT,'')
IF R.LOCAL.TABLE NE '' THEN
R.LOCAL.TABLE<FIELD1>=TIMEDATE()
R.LOCAL.TABLE<FIELD2>="PROCESSED"
R.LOCAL.TABLE<FIELD3>='PROCESSED'
CALL F.WRITE('F.LOCAL.TABLE',Y.ID,R.LOCAL.TABLE)
IF APPLICATION EQ 'FUNDS.TRANSFER' THEN
CALL F.DELETE('F.FT.CONCAT.TABLE',Y.ID)
END ELSE
CALL F.DELETE('F.STO.CONCAT.TABLE',Y.ID)
END
END

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

More
11 years 9 months ago #13461 by jpb
Replied by jpb on topic F.WRITE not always working
You should add a RELEASE / F.RELEASE on F.LOCAL.TABLE as ELSE just to be sure you are freeing resources.

END
END ELSE
CALL F.RELEASE('F.LOCAL.TABLE',Y.ID,F.LOCAL.TABLE)
END
The following user(s) said Thank You: Jo

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

More
11 years 9 months ago #13462 by Jo
Replied by Jo on topic F.WRITE not always working
Thanks jpb

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

Time to create page: 0.074 seconds