Here is a sample of the code. If you have the time,
I'd appreciate comments.
You're writing a lot of unnecessary code just to mimic a few RPG I/O op codes. You're using 284 lines (plus declarations not shown) to mimic an "F" spec, open, close, & chain. And using SQL in that context won't perform as well as the native op codes.
If you'd like to use SQL, consider writing a generic high-level wrapper around CLI, and using it to access any number of "tables" and "views" from any number of programs. Views enable you to streamline your RPG code by extracting rather complex SQL Select statements, using external data definitions.
I'll share an example of a PDF report where the data comes from a dynamically generated SQL result set.
This is an example of a typical interface / design pattern that we use for generating colorful, graphical, reports.
This mailing list archive is Copyright 1997-2020 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