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



Vern,

I was trying to keep it as simple as possible, I don't see how it could be simpler as I am no expert with stored procedures. By call to a service program I meant to a procedure in that program. I just recompiled to try to reproduce the problem, and it worked this time. So, I'm currently calling one procedure with input parameters only from the sql session and it works fine. Will have to find another way of exploiting a procedure with output parameters.



-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Vern Hamberg
Envoyé : jeudi 2 décembre 2010 14:01
À : Midrange Systems Technical Discussion
Objet : Re: Basic stored procedure questions

Hmm!

You don't CALL a service program - it should work in an SP -
there were examples in that Redbook, I believe, of the
necessary syntax for a service program - or else in the SQL
Reference - you have to include the procedure in parentheses,
as I recall.

What is interactive SQL going to do with a question mark? And
there's no means for interactive SQL to get a return variable
- consider whether you can get a return variable in a call to
a program on a command line - same issues.

It sounds like you're going beyond the simple right now - you
did not say whether you are trying to use the very simple
parameter style that allows calling existing programs. If so,
I'm not sure you can use a service program at all there.

Anyhow, there are specific things that have to line up for
the various parameter styles - keep it simple for now, then
branch out. You will find it much better when you first begin
with stored procedures.

Vern

On 12/2/2010 6:08 AM, David FOXWELL wrote:
Hi,
I'm looking at the red book Stored Procedures, Triggers,
and User-Defined Functions on DB2 Universal Database for
iSeries. Now I'm trying to call the stored procedure. I can't
use iNav as it seems to be broken so I'm calling in a STRSQL
session. Can this be done when a stored procedure returns a
parameter? The sql session doesn't like '?'. Also, the red
book example used a bound rpg pgm. I created my program using
a call to a service program which didn't work. When I
switched to a bound by copy, it worked. Is there a reason for this?


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