× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you for all the inputs. I did a POC to create a generic program to
handle all I/Os on a table by passing a json object to a procedure. I have
not tested it yet but I think it can be called from the handler also.

Idea is that in the future when time will come we can remove a file from
as/400 and use a table outside of as/400 using a rest endpoint or other
interfaces. I hope it helps to understand the need :)

Regards


On Wed, Jul 13, 2022 at 1:18 AM Vern Hamberg via RPG400-L <
rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

Guilty as charged! Yes, I wrote a handler to support all RLA opcodes a
few years ago. The reason for doing it was that FIELDPROCs on key fields
were processed differently in RPG vs SQL.

It supported all the opcodes, and I managed to get almost everything to
report back errors and status codes the same as native RPG - maybe 1
exception, IIRC. I never did deal with CCSIDs, although the OA data
structure includes that information.

I'm not sure where it is going - the company I write it for was
acquired, and I heard there was some combination of operations that had
an error - thought I got all the 2-ops combos done - all 70+ of them, as
I recall.

I'm still not seeing OA as a way to do CRUD - maybe I'm missing
something, but it's the same as others have said, you're still writing
code using standard RPG opcodes. Now that we can pass opened files to
procedures, that might offer some direction that is useful.

Someone had a generic file handler in the 90s - I saw it at RJS
Software, I think it was free. It used a program-described file, IIRC,
that was basically declared at maximum record length and divvied it up
according to the file field layout that was retrieved. It could not
handle NULLs, because program-described doesn't do that. I was thinking
about going to the C record-level functions instead - never did that,
however.

Cheers
Vern

On 6/27/2022 7:06 PM, Nathan Andelin wrote:
So far I haven't found an
example where I can see how to use them for SQL CRUD operations.

Are you considering writing an ROA handler that intercepts the RPG RLA
operation codes and then dynamically runs SQL equivalents under the
covers?
I seem to recall someone on this list doing that some years ago. I seem
to
recall some company sponsoring the project to support a security product
they were offering. Maybe Vern Hamberg?

--
This is the RPG programming on IBM i (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@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.