2 replies
VSAM files come in four flavors:
? KSDS ? Keyed Sequence Data Set, corresponds pretty well to a table in a relational database with one or more keys.
? ESDS ? Entry Sequenced Data Set, the sequence of records (rows) is based upon the sequence that the rows where entered, first to last. A relational table with an automatically generated key would do the same thing.
? RRDS ? Relative Record Data Set, records are retrieved by their record number. As with an ESDS, a relational table with an automatically generated key would do the same thing.
? LDS ? Linear Data Set, never used it, so I can?t help you their.
Basically you?ll need to write some kind of program to read each record from the VSAM file and write them to the DB2 table. Depending on the environment the choice of languages available for this task is BAL, C, COBOL, FORTRON and PL/I. While it may not be consider ?Good Programming Practice? if you name the columns the same and use COBOL you can use MOVE CORRESPONDING. You might even be able to use IDCAMS to create a flat file from the VSAM file and work with that.
by babibiet
this can be done thru load utility. but for that u have to convert the vsam files to sequential files and then use load utility.
this is a one time process.
or else,
u can load one by one row using insert into statement in db2.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending