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



You are correct. My apologies. I am indeed using SQL style.


midrange-l-bounces@xxxxxxxxxxxx wrote on 06/05/2008 01:51:44 PM:

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

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
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.






This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone this email or any information contained in this email. If you have received this email in error, please advise the sender by replying to this email, and delete this email immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Western Dental Services, Inc. Finally, the recipient should check this email and any attachments for the presence of viruses. Western Dental Services, Inc. accepts no liability for any damage caused by any virus transmitted by this email.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.