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



Steve

Basically, to deVELop anything using SQL in RPG, you have to have the licensed product. Everything involves embedded SQL in some way. As Rob said, you need to use CLI to get a result set from a stored procedure - you can't do that at all from RPG at this time. You can call any stored procedure, pass parameters, which can be modified by the procedure and then are available to the RPG program.

There is a free system available out there - it has all the SQL stuff - you could develop your stuff there, then take the compiled program back to your system and run it there, If interested, let me know - I'll dig up the details.

HTH
Vern

Steven Harrison wrote:
Thanks for the informative responses. One more quick question... So I
can create the stored procedure. Is there a simple means to call this
from an RPG program or do I need the Development Kit to embed the CALL
command? (Note: I'm aware of the CLI APIs but was wondering if there was
an easier means?)

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Wednesday, 2 September 2009 2:28 PM
To: RPG programming on the IBM i / System i
Subject: Re: Creating SQL Stored Procedures and Trigger programs without
DB2Query Manager and SQL Development Kit...

Hi Steve

In addition to Simon's comments, see inline -

Steven Harrison wrote:
Hi all,

-snip-
As a side note, I'm relatively new to the iSeries environment but it
seems strange that if IBM are pushing SQL as the new standard for
iSeries (to replace RPG IO and DDS) that the SQL pre-compilers are not
part of the standard iSeries package? Does anyone know if there is any
push to make them part of the standard operating system?

Putting support in place for creating stored procedures and SQL triggers

and probably user-defined functions is part of the strategy to make SQL more usable. Those items also used to require the development kit. Another item IBM have put into general distribution is the RUNSQLSTM command - that also used to require the SQL SDK.

The precompilers are required only on a box where the programs are created - they are not needed to run those programs on any box, because the database stuff IS in the OS. So many companies, I believe, get a smaller development box and get the SQL SDK fairly cheap, then distribute programs to the more expensive production boxes.

Of course, all iSeries and AS/400 and all have always had the query management objects and commands - things like QMQRY and QMFORM objects -

these can be used and created and all without the SDK at all. Of course,

they don't give you embedded SQL, but you are able to run any kind of SQL statement with them.

I do agree with you, however - I've also wondered why IBM do not take the extra step to help things with providing the precompilers - of course, they do have to recoup expenses, so the cost would probably be wrapped up in a slightly more expensive OS cost. ;-)

Vern

Cheers,


Steve


As an Amazon Associate we earn from qualifying purchases.

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