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


  • Subject: Create an SQL function
  • From: "Leland, David" <dleland@xxxxxxxxxx>
  • Date: Wed, 30 Aug 2000 14:27:58 -0500

Title: Create an SQL function

Okay, back to trying to create an SQL function (at V4R5M0).  I have a service program with an RPGLE module which has the following prototype:

D CENTER          PR          2000A   OPDESC          
D                             2000A   OPTIONS(*VARSIZE)

It's pretty basic.  It's used to center a string.  I've created the SQL function with the following statement:

create function utilities/center (varchar(2000))
returns char(2000)                             
external name 'UTILITIES/STRINGS(CENTER)'      
returns null on null input                     
Language RPGLE                                 
No SQL                                         
parameter style general                        
no external action                             

When I try to use the function, I receive the sql error: "Query cannot be run.  See lower level messages." and when I look at the lower level messages, I see: CEE0502 - "Missing operational descriptor.".

Anyone have any ideas what I'm doing wrong?  Has anyone created an SQL function over an RPG module in a service program?

Dave


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.