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



If it's a null issue then perhaps a look at the coalesce might help. 
However that kills the 'select *' mentality.

I stopped using select * in imbedded code a few releases back.  Had an 
external DS based on a file.  There were other libraries with this file 
that had extra fields on the end that we didn't care about.  Even though 
the DS was based on the shorter file it worked for the fields we cared 
about.  Along comes a new release and they upped the severity of the error 
and all heck broke loose.  Now we still use external DS's but we specify 
just the fields we want.  Makes the SQL statement a LOT longer though.

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Wilt, Charles" <CWilt@xxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/23/2005 02:25 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: SQL Date Type SQLRPGLE Program Error






I'd imagine that the date's aren't "zero" or "0001-01-01" as you say.

Instead, the dates are null and you need to pass a null indicator array to 
SQL so it can set the indicators for the null fields.

HTH,

Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Mike Wills
> Sent: Wednesday, March 23, 2005 1:53 PM
> To: Midrange_RPG400_L
> Subject: SQL Date Type SQLRPGLE Program Error
> 
> 
> I am hoping someone can help me understand why my code isn't working.
> On my file, there is some SQL date data types defined. For example:
> 
> D gResultDs     E DS                  EXTNAME(DBAPAPI)
> 75=D DAPICMPNY                      4B 0 
> 76=D DAPIVENDOR                     9A 
> 77=D DAPIINVC                      22A 
> 78=D DAPISUFFIX                     4B 0 
> 79=D DAPICNCLSQ                     4B 0 
> 80=D DAPICNCLDT                    10D   DATFMT (*ISO-)
> 81=D DAPIBTCHNM                     9B 0 
> 82=D DAPIBTCHDT                    10D   DATFMT (*ISO-)
> 83=D DAPIVCHNBR                    10A 
> 84=D DAPIATHCD                      3A 
> 85=D DAPIPRCLVL                     5A 
> 86=D DAPIACCRCD                     4A 
> 87=D DAPIINVOTY                     1A 
> 88=D DAPIINVCRR                     5A 
> 89=D DAPIPYCRRN                     5A 
> 90=D DAPIINSTIN                    10D   DATFMT (*ISO-)
> 91=D DAPIPRFRLC                     4A 
> 92=D DAPIPNMBR                     14A 
> 
> I am doing a "select *" and putting the results in gResultDs. I am
> getting a SQLSTT of 22008 and SQLCOD of -183. The text for the error
> is: Datetime field overflow occured; for example an arithmetic
> operation on a date or timestamp has a result that is not within the
> valid range of dates.
> 
> Using UPDDTA, I don't see any invalid dates. There are a couple that
> are "0" (0001-01-01), all of the rest are within this last year or so.
> Any ideas for me?
> 
> -- 
> Mike Wills
> Midrange Programmer/Lawson Administrator
> koldark@xxxxxxxxx
> http://www.mikewills.name
> Want Gmail? Email koldark+gmail@xxxxxxxxx to get on my waiting list.
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) 
> mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 

-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.