× 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.



Hi Nate

I dont know Mahammad goals.
My goal was to learn UDDS coding on S38. I did actually use UDDS once or twice in production.
Plus I had a nice utility to view/update any file.

My later goals were to learn how to use IBM APIs, I did, but I never used in production.
Later I wanted to learn C, which I did, after learning C what I really gained was RPGILE was mostly a C based model.
After learning C many things became clearer, procedures , prototyping , pointers, modules and so on.

Lastly I wanted to  transition my utility to the latest version of RPG.  SQL made the utility redundant, but it is a way to learn.
I failed because of the way NULL indicators are implemented, but learnt more  of Unix or is it C I/O functions to read SysI database.
Unix I/O is orders of magnitude more complex than RPG, not sure the complexity is worth the results.

Here I must mention my mentor, Scott Klement, without whose work I would never have progressed.
The S38 UDDS work was all mine own effort.

Finally my opinion on a Generic File Handler.  Yes I believe it is possible, but do you really want to get involved in the lower level detail of database access?
You end up redoing and taking over all the work the compilers do for you, and it is not really possible to do as well as the system developers have already done.
fwiw

Cheers
Frank



On 26/06/2022 9:31 am, Nathan Andelin wrote:
Mohammad,

I don't really understand your goal, nor the problem you may have with the
traditional RPG operation codes for DB I/O. But you could review the C
procedures, which are documented in the IBM i Knowledge Center, which are
exported from service program QC2IO. You could do a search on function
_Ropen, for example.

The C routines are functionally comparable to the traditional RPG operation
codes, except Library and File names are passed as parameters, so they can
be resolved at runtime, as opposed to the RPG method, which requires
Library and File names to be hard coded and resolved at compile time.

Given the C routines, you could write utility procedures that resolve
Library and File at runtime. For example, I wrote a generic procedure that
checks for the existence of any record in any file, given a File name and
Key value.

The C routines perform a little faster than the RPG RLA alternatives.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.