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



Thanks... yes, that was it. I was focused in on the "sizes" of the time fields... however it was the much simpler character fields causing the error.

I just added that state to my code:


if SqlStt <> SqlOk and
SqlStt <> SqlTrunc;
noRows = *on;
iter;
endif;

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Justin Taylor
Sent: Friday, January 10, 2020 4:01 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: SQL Error 01004

Have you looked up the SQLSTATE? https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzala/rzalaccl.htm

"01004 The value of a string was truncated when assigned to another string data type with a shorter length. +000, +445, +802, +20141"

I'd say double-check that the Db2 column definitions match the RPG fields.


HTH




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.