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



Kirkpatrick, in your original example you were using the SQL parameter
style, so perhaps you're referring to that, not GENERAL? I ask because I
don't see how GENERAL parameter style would work in this case.
The reason I think GENERAL won't work with CL is that it requires a service
program function that RETURNs a value (it cannot use an output argument).
Since I know of no way that CL can RETURN a value, I don't think GENERAL is
possible.

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 the
system needs to provide some sort of mapping for the external UDFs and SPs.
Mapping/Conversion/Casting is done automatically by DB2 between character
representations of a DATE, TIMESTAMP, TIME etc. because it knows that we've
specified DATE as a return type.

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 you
more info about the UDF (i.e. if you're going to write commercial apps).

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


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.