× 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 have never worked on a stored procedure myself.
Looking further, all the programs are called by a CLP in a nightly batch job in order to create the procedures.
Why RUNSQLSTM is not used or why fixed form RPG is used is unknown to me.

I can imagine :

Newcomers to embedded sql find it harder to distinguish in free form. I mean the fixed form makes it really stand out.
RUNSQLSTM produces spoule files, I think. Also, there's no help from the editor compared to putting it in an rpg.



-----Message d'origine-----
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de rob@xxxxxxxxx

David, not bad but I strongly recommend you look at
RUNSQLSTM. So much cleaner looking, especially since it
looks like you're either on an ancient version of RPG or have
an affinity for fixed format.


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





From: David FOXWELL <David.FOXWELL@xxxxxxxxx>
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxx>
Date: 03/09/2010 06:12 AM
Subject: RE: Stored procedure question
Sent by: midrange-l-bounces@xxxxxxxxxxxx




-----Message d'origine-----
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de dina ramzy

I want to create a stored procedure in AS/400
I know that I can strsql and type create procedure and write
some SQL inside...and the proc will be created...
But Can I also do this by creating a member in SRCPF?

Our stored procedures are in SQLRPGLE source members.

Eg, ( although not in free form ) :

C/EXEC SQL
C+ CREATE procedure myprocedure
C+ etc, etc.
C/END-EXEC

We have an sqlrpgle program for each stored procedure. The
program does
nothing other than create the procedure.

What should be the member type and how can I execute it
from CL prog?
SQLRPGLE. If I had to call it from CL I'd use REXX or put the
CALL in a
sourcefile member to be used by RUNSQLSTM.


How can I execute the code in the srcpf member in interactive SQL?
You can use the CALL command in an sql session
--
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.


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

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.