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



I apologize if this is the wrong mailing list but it does have to do with RPG in the end.

I completed the coding and began testing for an enhancement to an existing external stored procedure. I was adding a new input parameter of type DATE. During testing I was surprised that the CURRENT_DATE was being assigned in certain circumstances.

I tested it with different values and here are the results

Value passed Value in RPG program
'0001-01-01' '0001-01-01'
'2015-12-31' '2015-12-31'
' ' (quote blank quote) '2016-01-05' (current_date)
'' (quote quote) '2016-01-05' (current_date)
0 (zero) '2016-01-05' (current_date)
'2016-02-30' SQL State: 07006, Vendor Code: -99999, Message: Data type mismatch. (2016-02-30) (The RPG is never called)

I can understand the first two rows and the value in the RPG program is expected. But the values of the 3rd to 5th rows are not understood. I would think that I would get a Data Type Mismatch as is seem in the 6th row.

Can anyone explain this behavior.

Thanks and a belated Happy New Year to everyone.

Rob

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.