Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AS400 Varchar white space problem

258 views
Skip to first unread message

Mick Shaker

unread,
Mar 25, 1999, 3:00:00 AM3/25/99
to
We have been trying to find a way to trim white space from several 5K
VARCHAR columns. The application is a Java application using the AS400
JDBC classes with the IBM supplied JDBC network driver. The problem is
that we can not trim the column using either the TRIM or STRIP SQL
functions. We also tried unsucessfully to write an RPG stored procedure
that did an RPG trim, however we could not seem to find the write data
structure in RPG that had variable behavior. Any suggestions would be
appreciated.


Kent Milligan

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
Wasn't clear where you're trying to clear this whitespace? What makes
you think the STRIP didn't work? I suppose you could always try SUBSTR.

--
Kent Milligan, DB2 & Business Intelligence team
AS/400 Partners In Development
km...@us.removethis.ibm.com GO HAWKEYES!!
(opinions stated are not necessarily those of my employer)

Mick Shaker

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
To clarify the point a bit more....

We are trying to remove the white space prior to sending the note accross
the network. That is from DB2 AS400 to the Java client. On the Java client
side, when we inspect the string result of the trimmed 5K data column, it
shows the trim worked and not trailing white space. However, when you
monitor the TCP/IP packet going accross the network, you see the column
inside of the TCPIP packet at 5K, with all of the trailing white space at
the end.

Kent Milligan

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
I think what's happening is that we still send the maximum 5k in case
the result set contains a result of that size. I know the AS/400 ODBC
driver added a data compression option to help reduce bandwith in cases
like this, I'll check and see if the same option is available for the
JDBC driver.
0 new messages