Reducing the file size
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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
Dig Deeper on DB2 UDB (universal databases)
Related Q&A from Kent Milligan
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...continue reading
Create a host variable of the where in statement on the fly with dynamic SQL.continue reading
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
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.