What I did was the following:
I generated a table using plex the table has a field "Description" thats VaryCharacter and length is 1024.
Then I created a function to insert 10 000 rows into the table.
Using IBM Data studio and exploring the table and generate DDL of the table it says that the field "Description" is a CHAR 1024.
In the Green screen I WRKOBJPDM and view the table description to get the size in bytes of the table, my example the table size were +- 20mb.
Now I go back to the IBM datastudio and alter the table and change the field "Description" is a CHAR 1024 to "Description" is a VARCHAR 1024 ALLOCATE(8) and by doing this I expect that if i insert a row by using plex thats for example 7 characters long to insert it as 7 long not 1024.
In SQL when I get the length of "Description" it returns 1024.
Next I run a SQL statement to update updated the field "Description" with the trim(Description) .
If I run the same SQL again to get the length of "Description" it returns 7. and that I expect it because the data is only 7 characters long.
The problem that we have is this table is huge and its because if the 1024 field thats not a varchar or plex doesnt generate the table as varchar. and always inserts 1024 instead of the size of the data.
Is it possible in plex 6.1 to create a varchar on a table and when inserting example 7 characters to store only 7 characters and not 1024? this should decrease used space.
Hope I make sense ...