<<The irony is that a program that uses SQL may be allocating hundreds
of megabytes of heap storage to handle huge networks of records in
memory. You seem to be fanatical about using SQL over RLA. And you're
still concerned about 4K of static storage?>>
Huh again. Why would SQL allocate heap storage? SQL is not even native
to the RPG. All that happens is the pre-comiplier analyzes the source
and replaces the SQL with RPG program calls passing data structures.
When the RPG compiler gets it ti does not even know it is SQL. Just
Now I do have bitches about the use of the storage but not enough to
make stop using SQL. Every time the per-compiler sees a an executable
SQL statement it creates a separate data structure in static storage
with a 128 byte header plus a field for each data value being passed.
Complete waste of storage. Why not just create one data structure with
the same header and then just redefine storage? Just sloppy
Also, why if the SQL statement is in a sub-procedure, why not define
the data structures as local variables. Then it wouldn't matter. The
only purpose of the data structures is to pass the data to and from
the program calls to the router.
All this traces back to the per-compiler being written for RPG III. It
still pretty much assumes that it is generating code for RPG III and,
of course, my favorite why do you need a pre-comiplier at all? Why not
just let the RPG team extract the SQL statements and pass the SQL
statement to functions written by the SQL Team? Ex-Boss said they
asked IBM again and again to do this but he said politics got in the
Jon has said in previous posts that there was a big discussion within
IBM about re-writing the SQL in RPG but IBM decided to just to
continue patching it up.
The bottom line is that it works but could be done a whole lot better.
On Fri, Apr 6, 2012 at 11:56 AM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
Still cannot figure out why a RPG/ILE program using the MAIN
keyword, a single procedure doing nothing and NOUNREF used
with no debugging information needs 4k of static storage.
The irony is that a program that uses SQL may be allocating hundreds of megabytes of heap storage to handle huge networks of records in memory. You seem to be fanatical about using SQL over RLA. And you're still concerned about 4K of static storage?
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives