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