Sorry, I had not been following. I envisioned an RPG or other HLL program doing the work of the UDF.

"James Lampert" <jamesl@xxxxxxxxxxxxxxxxx> wrote:

Dennis wrote:
Yes. See PREPARE and EXECUTE IMMEDIATE statements.

Hmm. I'm not entirely sure how (or even if) this would work for the
issue at hand:

What I have is along the lines (simplified and censored) of:

create function displayval(i_fldid NUMERIC,
i_key VARCHAR(10))
returns varchar(50)
language sql deterministic not fenced
declare result char(50);
declare tbl char(11);
if i_key = ' ' then return ' '; end if;
SELECT TBLID INTO TBL from FOO where dfid = i_fldid;
select DEF INTO result from BAR
where PTBLE = substring(tbl from 1 for 3)
and PCODE = substring(i_key from 1 for 5)
and STBLE = ' ' and SCODE = ' ';

What I'd like to have would add a third parameter:

create function wintouch/displayval(i_fldid NUMERIC,
i_key VARCHAR(10) i_lib varchar(10))

and then qualify FOO and BAR with i_lib.

Or otherwise guarantee that FOO and BAR are both the ones in i_lib, and

not from some other library.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

Sent from my Galaxy tablet phone with with K-9 Mail. Please excuse my brevity.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by 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].