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



Hi Steve,

Just try to use PARAMETER STYLE GENERAL instead of PARAMETER STYLE DB2SQL. 
With Parameter Style DB2SQL SQL adds some more parameters.
Because you only defined one parameter for the UDF, parameter 2 and 3 are
replaced by these additional SQL parameters.
A parameter only passed an address and in this way you see garbabe in your
parameters 2 and 3.

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) 



-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Coyle, Stephen F.
Gesendet: Wednesday, January 17, 2007 17:43
An: RPG400-L@xxxxxxxxxxxx
Betreff: User Defined Function Definition with Omissible Parameters 


Hi All, 
        I have a user defined function as:      
CREATE FUNCTION GBCMODS/CVTTOJDEDATE (           
 DATEIN DATE )                                   
 RETURNS NUMERIC(6, 0) CAST FROM NUMERIC(6, 0)   
 LANGUAGE RPGLE                                  
 SPECIFIC GBCMODS/CVTTOJDEDATE                   
 NOT DETERMINISTIC                               
 NO SQL                                          
 RETURNS NULL ON NULL INPUT                      
 DISALLOW PARALLEL                               
 EXTERNAL NAME 'GBCMODS/PRDATES(CVTTOJDEDATE)'   
 PARAMETER STYLE DB2SQL ;     

The Program Interface to the CVTTOJDEDATE procedure has changed to:
D CvtToJDEDate    PI             6S 0                              
D  InputDate                      D   CONST OPTIONS(*OMIT)         
D  Date2DigitYY                  8    CONST OPTIONS(*NOPASS:*OMIT) 
D  Fmt2DigitYY                   7    CONST OPTIONS(*NOPASS:*OMIT)


The function no longer works within SQL. Debug shows that the function is
passing junk to the 2nd and 3rd procedure parms. Does anyone know how to
define omissible parameters on the Create Function?  

Thanks in advance...
Steve...              


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.