What do the commonly used database access tools do with updating VARLEN fields?

Been following this closely, as I've recently been incorporating varying fields without always knowing what I'm doing. On the topic of trimming when loading a DDS-described VARLEN field, and how that data is presented in some popular database access tools for i, I observed something peculiar and possibly troublesome.
The use of a database access tool to modify field values may cause a previously-correctly loaded varying field to be right-padded with blanks.

Our shop had EZVIEW for many years. Maintenance costs changed, and we chose to replace EZVIEW with DBU several years ago. We still have both, so I tested against both on a "text" field defined in DDS as 64A VARLEN(32).
I loaded the field, "TEXT" with 'abcdef' using an SQL update, and observed with the SQL "select hex(TEXT)" that there were no trailing blanks.

I played with the record using DBU in update mode, and was unable to put any blanks past the 6th position. It automatically trimmed all trailing blanks - even the ones I tried to put in from the keyboard.
I brought up the same record using EZVIEW, and found that keying any change into that field ALWAYS padded the entire record with x'40'.
Granted the EZVIEW product may have been "fixed" since our copy was last updated, but it's something to be aware of.

-- Michael

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page