× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



is the SQLPKG an object on the system? I don't see it when I run DSPOBJD.

Thanks for the reply. I have always been curious where RPG stores the SQL
instructions a program runs.

here is the PRTSQLINF output:
CRTSQLRPG
PGM(SRINV/TEMPRPG)
SRCFILE(SRINV/QRPGSRC)
SRCMBR(TEMPRPG)
COMMIT(*CHG)
OPTION(*SYS *PERIOD)
TGTRLS(V5R4M0)
ALWCPYDTA(*OPTIMIZE)
CLOSQLCSR(*ENDPGM)
RDB(*LOCAL)
DATFMT(*MDY)
DATSEP('/')
TIMFMT(*HMS)
TIMSEP(':')
DFTRDBCOL(*NONE)
DYNDFTCOL(*NO)
SQLPKG(SRINV/TEMPRPG)
MONITOR(*USER)
SQLCURRULE(*DB2)
ALWBLK(*ALLREAD)
DLYPRP(*NO)
DYNUSRPRF(*USER)
USRPRF(*NAMING)
SRTSEQ(*HEX)
LANGID(ENU)
RDBCNNMTH(*DUW)
TEXT('BOL Scanned Entry,Load Master Files,Cust 01/03/05 ')
SQLPATH(*LIBL)
DECRESULT(31 31 0)



On Wed, Nov 30, 2011 at 11:13 AM, Alan Campin <alan0307d@xxxxxxxxx> wrote:

Another way to interpret your question is that complied SQL statement
stored. If you do a PRTSQLINF it shows you what it has stored. This is
stored in an object in the program that stores the SQL and the access plan
if it has been executed at least once. Probably the equivalent of an SQL
Package. If you do a DMPOBJ one the pointers for a SQL program will be a
pointer to that object.

On Wed, Nov 30, 2011 at 9:07 AM, Alan Campin <alan0307d@xxxxxxxxx> wrote:

If I understanding the question correctly the text is only seen by the
pre-compilier which converts to rpg calls. The SQLRT are the SQL calls.

On Wed, Nov 30, 2011 at 8:42 AM, Steve Richter <stephenrichter@xxxxxxxxx
wrote:

When CRTSQLRPG runs it places the converted SQLRPG -> RPG code in a
srcmbr
in QTEMP/QSQLTEMP. When I look at the QSQLTEMP code I don't see the text
of
the sql instructions. Just a call to SQLRT.

How is it I can compile and run the source in QSQLTEMP without the sql
instruction text being passed to any of the SQL processor programs?

this is the rpg code in QSQLTEMP that runs the SQL instruction:

C*EXEC SQL
C* SELECT COUNT(*)
C* INTO :VCOUNT
C* FROM BOLMSTRH
C* WHERE BOL2DH = :VBOL2D
C*END-EXEC
CL0 Z-ADDVBOL2D SQL005
CL0 Z-ADD-4 SQLER6 1
CL0 CALL SQLRT
CL0 PARM SQLCA
CL0 PARM SQL000
CL0 SQL004 IFEQ '1'
CL0 Z-ADDSQL006 VCOUNT
CL0 END
--
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-2024 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.