I've written and published a basic handler that uses a web service via Scott's HTTPAPI - a few years old now but the principals remain the same. http://www.ibmsystemsmag.com/ibmi/developer/general/oa_rpg/ It used my OA template as the foundation which can save you a lot of time and effort if you have not written fo OA before. Details here: http://ibmsystemsmag.com/ibmi/developer/rpg/open-access-templates/ <http://ibmsystemsmag.com/ibmi/developer/rpg/open-access-templates/>

Which reminds me - I really must update that to dcl-x data definitions.

Not sure how well you "cache" idea will work unless you can guarantee that there is never any direct access to the related file. Sound like a problem waiting to happen.

Jon Paris


On Jan 14, 2019, at 5:15 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

So we've got a requirement to modify our existing RPG applications so that
for some users, instead of updating a local Db2 file, we need to make REST
call to post the data to an external server.

Reads will be from the local Db2 table; though we're planning to cache the
"update" that was posted to the web service. So that we don't have to wait
for the data to be replicated back to the i. (We considered a Db trigger,
but that idea was a no-go. Eventually the READs for some users will also
be pointed to the web service)

Anybody ever done or even considered such a handler?

Any tips/tricks/gotchas you can share?

This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].