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



Dan

I think I was the one that given you the earlier suggestion - I apologize for any confusion - I was referring to the SQL parameter style, which is different. Here is the description of the parameters from the manual:

- The first N parameters are the input parameters that are specified on the CREATE
FUNCTION statement.
- A parameter for the result of the function.
- N parameters for indicator variables for the input parameters.
- A parameter for the indicator variable for the result.

There are a couple more with this style - SQLSTATE returned, function name, schema name, and returned message.

There are differences from the GENERAL WITH NULLS - the result is returned in a parameter, not a by value return value, as Simon pointed out. And NULL indicators are separate (N) parameters, not an array.

I prefer the SQL style, especially as I can return an SQL state value - this fits SQL standards better. I also like the separate parameters for the indicators - but that is a detail about self-documenting code mor than anything else.

The GENERAL [WITH NULLS] is an accomodation that lets you use existing code more easily - at least that is my understanding from the RedBook.

Again, sorry for the confusion - what I recommended would have worked with SQL style, but now I know it does not work with GENERAL WITH NULLS.

Thanks
Vern

At 05:00 PM 12/28/2006, you wrote:

On 12/21/06, Simon Coulter <shc@xxxxxxxxxxxxxxxxx> wrote:
>
> Does that match the description of the parameters? No, it doesn't. You
> have separate parameters for the null indicators associated with the
> four input parameters. Thus the last 3 parameters will not be passed
> and will result in MCH3601 when you attempt to reference them.


Just went by what someone else suggested in this thread and which sounded
like he had done previously.  Thanks for the head shot and the correct
solution, Simon.

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

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.