|
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,the
I don't really understand your goal, nor the problem you may have with
traditional RPG operation codes for DB I/O. But you could review the Coperation
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
codes, except Library and File names are passed as parameters, so theycan
be resolved at runtime, as opposed to the RPG method, which requiresthat
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
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.
--
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 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.