<<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
compiles RPG.

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
programming

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

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?

-Nathan.

--
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,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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-2019 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].