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



create function ROB3/OnHand (dec (11,3), dec (11,3), dec (11,3),
                        dec (11,3))
returns dec (11,3)
...

DSPLYT IIM
IADJ            48      53  P11.3
IRCT            54      59  P11.3
IISS            60      65  P11.3
IOPB            66      71  P11.3

> Select iprod, iopb, iadj, irct, iiss,
>        OnHand(iopb,iadj,irct,iiss)
> from iim

11.3 not 11.2, looks like a good match to me.  It's not a packed issue eh?

And I read that part you referenced in the SQL reference about using
different functions based on the typing.

Rob Berendt

==================
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin



                    "R. Bruce Hoffman,
                    Jr."                      To:     <midrange-l@midrange.com>
                    <rbruceh@attglobal.       cc:
                    net>                      Fax to:
                    Sent by:                  Subject:     Re: Error using a 
function
                    midrange-l-admin@mi
                    drange.com


                    11/29/2001 05:52 PM
                    Please respond to
                    midrange-l






----- Original Message -----
From: <rob@dekko.com>
To: <midrange-l@midrange.com>
Sent: Thursday, November 29, 2001 5:15 PM
Subject: Re: Error using a function


> set path = rob3
> SET PATH statement complete.
> Select iprod, iopb, iadj, irct, iiss,
>        OnHand(iopb,iadj,irct,iiss)
> from iim
> INVENTORY in ROB3 type *SRVPGM not found.
>

if I remember correctly, you defined the function with all four fields and
the return declared as dec(11,2). So... what are the attributes of the four
fields you pass in to the function? I had the same problem with the first
function I wrote... SQL _so_ strongly typed on the fields definitions, that
if any of those fields are, say, numeric or integer, the function will NOT
be called. Since the function appears to be there and the list is probably
not the problem, I would double check the typing.

because DB2 is leaning towards objects now, you will find that you can
create the same function with different parameter types. The signature is
generated along the lines of C++ functions.

===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified Specialist - iSeries Administrator
 -- IBM Certified Specialist - RPG IV Developer

"I want to be different, just like everybody else!"
  - Ceili Rain



_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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 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.