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



I wouldn't use RPG source to create stored procedures.
I wouldn't use the STRSQL part of the SQL development toolkit either. Why? 
 Because you don't retain the source (well, without jumping through 
hoops).
I would use one of two things.
My first choice would be storing them into a source member.  Then I could 
use RUNSQLSTM to generate them.  Think of using RUNSQLSTM to create stored 
procedure, functions and even files; like you would use CRTPF to compile 
DDS source members.
My much lower second choice would be to store the source in an IFS file 
that has a share built on it's directory.  Then I could map a drive to 
this from my PC and use iSeries Navigator's "Run SQL scripts".

Getting back to the RPG.  Now, I may create a program, or service program, 
with rpgle and this program may, or may not even, have any sql in it. Then 
I would still create a different source member that I would then use 
RUNSQLSTM against to make the RPGLE program, or service program, into a 
stored procedure or user defined function.  Clear?  But I sure wouldn't 
have any RPG source that had any CREATE... statements in it.  (Well, 
outside of QTEMP anyway.)  To me, that would be like burying all your DDS 
into a compile time table in a RPG program and having to recompile the 
rpg, and run it, every time you wanted to change a file.

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





"Frances Denoncourt" <Frances.Denoncourt@xxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
04/19/2005 03:55 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
<midrange-l@xxxxxxxxxxxx>
cc

Subject
Creating stored procedures






We have been looking into various ways of creating stored procedures on
the iSeries.

We don't have SQL installed on our 400s. Still trying to find out if
it's on the CD but has not been installed. 

Several attempts to find out what it costs. Still don't know. Ops Mgr
got a quote on Sequel.....

My boss has an old release of iSeries Navigator; I don't have any, yet.
We are both supposed to get the latest tomorrow.

We have been able to create a stored procedure using 'ROWSET' viewer
and also with iSeries Navigator and  SQLServer.

I also created a stored procedure from source in an SQLSRC file I
created. The object is a *PGM (CLE). Haven't figured out how to call it
from a CL pgm, yet. The compile fails : Can't find the 'definition'. 

My questions are:
What are the advantages of creating a stored procedure using iSeries
Navigator vs SQLServer tool vs C source vs RPGLE source? 

If we ever find out how much it costs, will it add to the functionality
of stored procedures if we can purchase SQL (and all its bits and
pieces)?

I know this sounds like we don't know what we are doing.....guess
what?? It's true. We've been reading forums, manuals, redbooks, etc.
(Hard to believe, isn't it?)

Thanks for any help you can throw our way.


Fran Denoncourt
Sr. Programmer/Analyst
Pinal County Treasurer's Office
Florence, AZ 85232
(520) 866-6404

Receipt of this message does not grant you permission to send me 
Unsolicited Commercial Email

-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.