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



I think what I say is still true - character literals are passed as VARCHAR() - this can be a real surprise. For this reason, to allow me to use literals in the parameters, I declare character parameters as VARCHAR() all the time.

Vern

At 12:25 PM 1/25/2007, you wrote:

Attention!

Overloading means, that the same procedure can exist with a different number
of parameters in the same schema.
But these procedures are different programs that can do something completely
different.

For Stored Procedures only the number of parameters and the data types are
checked, but not the length.
Also compatible data types (such as Decima, Integer) can be passed for
numeric fields, and CHAR(), VARCHAR(), GRAPHS() can be passed for character
fields. The length of the parameters is not checked.

For User Defined Functions, overloading is slightly different. In the same
schema several UDFs with the same name can coexist,

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 rob@xxxxxxxxx
Gesendet: Thursday, January 25, 2007 19:00
An: RPG programming on the AS400 / iSeries
Betreff: Re: store procedure - parameter passing


Pretty sure you do.  Stored procedures support "overloading".  You can
have the same procedure, with the same name, out there multiple times. The
differentiator being the parameters.  It would be like having an RPG
subprocedure called AddDaysToDate and automatically determining on the
type of the first parameter if you are working with character, numeric,
true dates, etc.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/25/2007 11:13 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc

Subject
store procedure - parameter passing






when calling a store procedure, do I have to pass the exact length of the
inpur parm?

Using the following procedure as an example
CREATE PROCEDURE AILSEQMSP
(
     In    inSerialNo    Char(15),
     In    inOffice      Char(3),
     In    InSystem      Dec(1,0),
     Out   outErrFlag    Dec(1,0),
     Out   outErrCode    Char(7),
     Out   TotalRecords  Dec(8,0)
)
Result Sets 1
Language RPGLE
External name AILSEQMRP

would the following different call statement make a different?
- call AILSEQMSP('A              ', '   ', 1, rsParm1, rsParm2, rsParm3)
- call AILSEQMSP('A', ' ', 1, rsParm1, rsParm2, rsParm3)
- call AILSEQMSP('A  ', '', 1, rsParm1, rsParm2, rsParm3)

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


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





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