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



You can keep them as the same name... with one passing a parm and the other
not passing the parm. Then SQL will determine with one to use.


Michael Schutte
Bob Evans NEW! Farmhouse Philly Knife & Fork Sandwich: It's No Ordinary
Sandwich!
Try all four Knife & Fork Sandwiches, starting at 5.99.
For more information, visit www.NoOrdinarySandwich.com


rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/03/2008 02:40:27 PM:

Well that just sucks.......

Ok, in order to make the procedures more intuitive, I just separated
them into two separate procedures. getCashByAcct, and getCashAllAccts.

Thanks,

Mark

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Friday, October 03, 2008 2:08 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: %parms() BIF

Mark,

SQL doesn't pass a basic operational descriptor, unlike RPG. It is
this opdesc which lets the RPG subprocedure know how many parameters
have been passed. The same goes for some other languages (no doubt
someone else will chime in which ones they are, if you're interested...).

Anyway, to solve your probelm, the easiest thing to do is to add
code to your RPG sub-procedure to treat blank parameters as
equivalent to un-passed parameters, and then pass those parameters
as blank from the SQL function.

Rory

On Fri, Oct 3, 2008 at 10:44 AM, Mark Walter
<mwalter@xxxxxxxxxxxxxxx>wrote:

I have a sub-procedure in a service program that uses the %parms()
bif. If I call the sub-procedure from RPG, it works fine. However, if
I call it from an SQL External function, it returns -1. Any idea why?

Thanks,

Mark

Mark Walter
Certified IBM System I Specialist
Paragon Consulting Services, Inc
http://www.paragon-csi.com
mwalter@xxxxxxxxxxxxxxx
717.764.7909 x126
--
This is the RPG programming on the AS400 / iSeries (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.


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.173 / Virus Database: 270.7.5/1705 - Release Date:
10/3/2008 8:18 AM
--
This is the RPG programming on the AS400 / iSeries (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.