|
Kirkpatrick, in your original example you were using the SQL parameterI
style, so perhaps you're referring to that, not GENERAL? I ask because
don't see how GENERAL parameter style would work in this case.service
The reason I think GENERAL won't work with CL is that it requires a
program function that RETURNs a value (it cannot use an outputargument).
Since I know of no way that CL can RETURN a value, I don't think GENERALis
possible.the
Can you show an example with GENERAL parameter style?
Charles, regarding
How does this work?
This is simply the way external UDFs work. I don't think any HLLs have
native data types for DATE, TIMESTAMP, TIME etc. data types. That means
system needs to provide some sort of mapping for the external UDFs andSPs.
Mapping/Conversion/Casting is done automatically by DB2 betweencharacter
representations of a DATE, TIMESTAMP, TIME etc. because it knows thatwe've
specified DATE as a return type.you
BTW, I prefer Kirkpatrick's use of SQL parameter style over DB2SQL. It's
simpler and easier to work with than DB2SQL, although DB2SQL parms give
more info about the UDF (i.e. if you're going to write commercial apps).list
Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
-----Original Message-----
Subject: RE: Retrieve JOB (not SYSTEM) date in SQL
GENERAL style parameters worked also.
midrange-l-bounces@xxxxxxxxxxxx wrote on 06/05/2008 12:16:13 PM:
Ok Elvis,
How does this work?
How can you return a date from a CL program???
Aahh, I see DB2SQL style parameters work that way. Cool, learned
something new.
Charles Wilt
--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.