Reducing the file size
I know that I can write a conversion program to read in the old file, populate the new file, and get the desired outcome. But I was hoping my initial approach would work.
Before you trim out the trailing blanks, your variable length fields are stored in a secondary storage container that's part of your file object. Even though you update these variable length fields to a length of zero, all/some of this storage space in the secondary container is left for new variable length field values that will be added in future inserts, updates, and deletes. In addition, the usage of variable length fields add some additional overhead to each record to keep track of the location and length of variable length fields. Also, if your variable length field is 30 bytes or less, than DB2 may also ignore your Allocate setting.
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this Search400.com Featured Topic: Database issues resolved
Related Q&A from Kent Milligan
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...continue reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ...continue reading
IBM did not change the default of the reuse deleted files function to YES for physical files in order to minimize the impact on any existing ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.