Reputation: 7126
I have run into an issue where data created on our IBM i through a traditional green screen application isn't reflected by a web app I'm writing. It would seem that records I add from the web app are immediately available to both the web app and the IBM i, but records I create on the IBM i are not immediately available to the web app. I thought it might be a cache problem, but after restarting my web app, the record is still not there. I've tried setting javax.persistence.cache.retrieveMode
to BYPASS
and that setting is reflected when my Hibernate entity manager is created, but the data returned from my query still is missing the record added through the green screen.
At this stage, I don't think it's a cache problem. So here is the testing I've done so far.
The files I am working with are WOHDR2 and WOJOBS, where WOHDR2 is the header file and WOJOBS is the detail file.
Here is what I have tested so far.
Record added to file WOJOBS through web app and immediately associated to WOHDR2 - These records reflect the ID field of the parent WOHDR2 and are visible in both the web app and the green screen.
Record added to file WOJOBS through green screen app with no ID association to WOHDR2, ie: it's in pending state until a user assigns it to a WOHDR2 later - This record is visible through the green screen app, but not the web app
Associate a WOJOBS record to a WOHDR2 through green screen - I can now see the WOJOBS record through the web app
Record added to file WOHDR2 through web app or green screen app - Records are visible through the web app and the green screen application simultaneously
Upvotes: 0
Views: 215
Reputation: 23813
There's a few reasons you wouldn't see the records you expect.
Solutions
FEOD(N) mytable;
in your RPGLE program prior to returning from it. This will flush the RPGLE buffered output to the DBMS.SET OPTION
statement. It should be noted that RPG doesn't buffer output if there's a unique key defined over the table being written to; otherwise the DBMS wouldn't be able to ensure uniqueness. FRCRATIO(1) is left over from way back before journaling and commitment control....it allowed you to force records not only to the DBMS but all the way to disk. Turning it on today is a great way to slow down your application.
Upvotes: 1