|
-----Original Message-----
From: Leland, David <dleland@Harter.com>
To: 'MIDRANGE-L@midrange.com' <MIDRANGE-L@midrange.com>
Date: Wednesday, August 30, 2000 5:08 PM
Subject: 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)
>
>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?
So, you are assuming that SQL describes the parameters passed in?
Offhand, I am not aware of any operational descriptor specification within
the SQL parameter types. And for OPDESC to work, the caller must agree to
send the operational descriptor.
I could be wrong, but I am fairly certain, that SQL does not do descriptors.
I think that what you are looking for is a VARCHAR type, that contains the
length of the parameter in the first two bytes and must be set by your
program prior to the call.
===========================================================
R. Bruce Hoffman, Jr.
-- IBM Certified Specialist - AS/400 Administrator
-- IBM Certified Specialist - RPG IV Developer
"Those who would give up essential Liberty,
to purchase a little temporary Safety,
deserve neither Liberty nor Safety."
- The Papers of Ben Franklin
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.