×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Yes, that pretty much says it Rob. When the EXEC SQL is broken out, by the
precompiler, into the base calls, the calls are done locally, but using
global variables. I know I'm probably being too conservative in this world
of large memory, but I was hoping to reduce the amount of used memory when
not needed.






rob@xxxxxxxxx
Sent by:
rpg400-l-bounces@ To
midrange.com RPG programming on the IBM i /
System i <rpg400-l@xxxxxxxxxxxx>
cc
09/02/2009 04:35
PM Fax to

Subject
Please respond to Re: SQL and reducing static storage
RPG programming
on the IBM i /
System i
<rpg400-l@midrang
e.com>






So basically, if you tried using a local variable by sql as in

p mysub b
d mysub pi
d mylocalvariable...

exec sql select column into :mylocalvariable from file where
key=:lockey;

then the precompiler would do something like duplicate mylocalvariable
into the main area, and then host that variable instead so it looked
something like
exec sql select column into :mainvariable from file where key=:lockey;
mylocalvariable=mainvariable;

Interesting. So the precompiler can now state they support local
variables, they just do it by using main variables and moving them back in
and out.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
darren@xxxxxxxxx
To:
"midrange-RPG RPG message board" <rpg400-l@xxxxxxxxxxxx>
Date:
09/02/2009 04:14 PM
Subject:
SQL and reducing static storage
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx




I had the bright idea of using no static storage, except what was
absolutely required, by moving all structures to subprocedures. I found
that static storage (seen in DSPPGM) wasn't decreasing much for my effort,
so I looked at the compile listing. I found every field that I used as a
host variable for SQL, in the static storage definition area. Is there
anyway to make the SQL temporary variables local to the procedure using
them?

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




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.