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 mailing list archive is Copyright 1997-2025 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.