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



Figured out the problem. The programmer that wrote it (not me this
time) was using the wrong key. Once we figured that out it worked as
expected.

I probably would have caught it sooner if I wasn't working on 4
projects at once.

Thanks for the help everyone.

--
Mike Wills
http://mikewills.me



On Thu, Mar 10, 2011 at 11:20 PM, Birgitta Hauser
<Hauser@xxxxxxxxxxxxxxx> wrote:
Mike,

Normally a SQL stored procedure can be called with the SQL command CALL.
(even before release 7.1)

Did you check the SQLCODE/SQLCOD or SQLSTATE/SQLSTT immediately after the
call?
What SQLCODE or SQLSTATE is set?

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Mike Wills
Gesendet: Friday, 11. March 2011 04:19
An: RPG programming on the IBM i / System i
Betreff: Re: Calling Stored Procedures in RPG

In summary:

It is an SQL stored procedure. (From my previous recent threads.)

I was hoping to call it like

c/exec sql
c+ call MPRLIB/SP_VERIFYHOURS (:key, :reply)
c/end-exec

key is defined as IN. reply is OUT.

Reply should be returning a 1. We are getting 0, the default for the
variable.

The stored procedure works just fine when called from ASP.NET.

--
Mike Wills
http://mikewills.me



On Thu, Mar 10, 2011 at 5:52 PM, Vern Hamberg <vhamberg@xxxxxxxxxxx> wrote:
Mike

Your last statement confuses me - exec sql IS using SQL. Do you perhaps
mean CLI?

I don't know if output parameters can be seen in RPG - I know that it
was not possible to get a result set from a stored procedure in earlier
releases.

On 3/10/2011 2:20 PM, Mike Wills wrote:
We are on 6.1.

I didn't wrap that in the exec sql. We are using SQL to call it.

--
Mike Wills
http://mikewills.me



On Thu, Mar 10, 2011 at 2:17 PM, Mark S. Waterbury
<mark.s.waterbury@xxxxxxxxxxxxx>  wrote:
Hi, Mike:

What version / release of OS/400 or i5/OS are you running?

I do not think this is supported until IBM i 7.1 ...

Mark S. Waterbury

  >  On 3/10/2011 2:52 PM, Mike Wills wrote:
A web search shows me how to use stored procedures to call RPG, but I
want to call a stored procedure from RPG with one out parameter.  We
are currently doing `call MPRLIB/SP_VERIFYHOURS (:key, :reply) ` but
it doesn't seem to be working. key is defined as IN and reply is
defined as OUT. What are we missing?

--
Mike Wills
http://mikewills.me
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.