×

Good News Everybody!

The new search engine is LIVE!

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




Should have put into previous response. 

c) I believe that QMQRY objects cannot use the 'select' statement, as
there
is no mechanism to return results to a calling program.

Incorrect. QMQRY can use anything and especially Select. Be kind of hard
to create reports if you couldn't Select. QMQRY are basically just
wrapper for compiled SQL. I think you are thinking of RUNSQLSTM. 

Question: am I correct in my understanding that the main difference
between
dynamic and static SQL is that static SQL uses an already-prepared
statement, an *SQLPKG? And that the IBM precompiler simply creates and
names
those *SQLPKG objects for you?

Sort of. It creates a run plan and stores it inside the program object.
The format is the same. That is why you can PRTSQLINF on a RPG/SQL
program. 

The advantage to the pre-compiler is always the same. The SQL is
verified and compiled and a tentative run plan created. The first time
you run the program, it goes out to create a complete run plan. It only
recreates the run plan after that if something changes significantly in
the database.
 


This thread ...


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.