Load VSAM data to DB2 TABLE
Thu, 06/16/2011 - 21:53
In my current project, we are trying to convert
all the VSAM files to DB2 TABLES. We have created the
DB2 tables for each VSAM file.
Now we need to load the data from VSAM files to DB2 tables.
One approach that I have in my mind is to unload the data from VSAM into
flat files using REPRO and then use IKJEFT01 utility to load the data
from flat files to DB2 tables.
I am looking for a better solution, I do not want to create the
intermediate flat file.
Karthik"; ; ; ;
Fri, 12/30/2011 - 06:11#1
db2 load from vsam
[quote]I am looking for a better solution, I do not want to create the intermediate flat file.[/quote] I believe you do want the intermediate file - both for dealing with anything "special" and for performance. If you read vsam / insert db2 you will have chosen what is probably the worst possible alternative if performance might be an issue. If the largest table has only 100 rows, this could work, but i've found using the same approach for all of the file-to-table processes is more understandable to others. If you retain the intermediate data in a common backup (adrdssu/dfdss) you can get back to different loads if ever needed. I would use the LOAD rather than some other method.