chand
chand

Reputation: 31

Loading VSAM files to db2 or flat file

I need to load VSAM files to db2 tables and i am fairly new to these kind of files, can someone help me the steps to load db2 or how to convert them to text files.

Thanks.

Upvotes: 3

Views: 1778

Answers (2)

cschneid
cschneid

Reputation: 10775

Use IDCAMS REPRO to export VSAM to flat file, and use your shop's preferred DB2 load utility to import from flat file to DB2. You'll likely have to reformat the exported VSAM data, possibly with your shop's SORT utility, unless the DB2 tables are just copies of the VSAM file layouts.

IDCAMS is documented in the z/OS DFSMS Access Methods Services Commands manual in the z/OS DFSMS section of the IBM Documentation for your version/release of z/OS.

Upvotes: 2

Timothy Sipples
Timothy Sipples

Reputation: 134

I agree with cschneid if your need to load VSAM data sets into Db2 is a one-time need or infrequent.

If your need is more frequent, or if you need near real-time access (from Db2) to data that originates in VSAM, then you would use a data replication technology. In IBM's product portfolio (for example) that'd likely be one component in the IBM InfoSphere Data Replication family of products for z/OS.

If you need real-time access to live VSAM data sets for applications and users that ordinarily access Db2 and don't know how to access VSAM directly, then you would use a data federation or data virtualization technology. In IBM's product portfolio (for example) that'd likely be IBM Data Virtualization Manager for z/OS.

z/VSE also supports VSAM data sets, so if you meant z/VSE's (not z/OS's) VSAM then, as one option, you could use the z/VSE VSAM Redirector, available at no additional charge to all z/VSE licensees. The VSAM Redirector allows you to relocate VSAM data (selectively or entirely) into practically any relational database. Db2 for z/OS or Db2 for Linux on Z, running on the same machine, is highly preferred for performance and reliability reasons. The z/VSE applications continue to run, unmodified, since they still perceive the data to be in VSAM data sets. At the same time, applications and users authorized to access data in the relational database get simultaneous access to the live z/VSE-managed data plus other data.

Upvotes: 1

Related Questions