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



The RPG definition is based on a file (that I don't want to change).
If I change the SQL query (which I considered), then if I ever change the file definition down the road (which is likely) I would have to remember that line of code.

The likelihood of the other fields being truncated is slim-to-none.

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

Wouldn't it be better to either change the RPG field definition, or change the SQL query to clip the return column to the desired length?


-----Original Message-----
From: Greg Wilburn [mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx]
Sent: Friday, January 10, 2020 3:14 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: SQL Error 01004

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;


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.