IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to convert VSAM file record into DB2


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jayaprakashr
Currently Banned

New User


Joined: 23 Jul 2005
Posts: 6
Location: bangalore

PostPosted: Sat Jul 23, 2005 1:30 am
Reply with quote

Hi,
how to convert VSAM file record into DB2.plz let me know icon_razz.gif icon_confused.gif [/b]
Back to top
View user's profile Send private message
rick

New User


Joined: 18 Jun 2004
Posts: 59
Location: Chennai

PostPosted: Thu Jul 28, 2005 12:52 am
Reply with quote

If u use tools to convert VASM file to DB2
Back to top
View user's profile Send private message
surya

New User


Joined: 19 Feb 2005
Posts: 13

PostPosted: Thu Jul 28, 2005 3:36 am
Reply with quote

hi
how to convert VSAM file record into DB2.plz let me know?

what type of tool?
Back to top
View user's profile Send private message
manjithota

New User


Joined: 09 Jun 2005
Posts: 10

PostPosted: Wed Aug 03, 2005 2:26 pm
Reply with quote

hi,
load all your vsam records into a sequential dataset in the first step. then use LOAD utility to load all the data to ur db2 table.
while using LOAD don't forget to mention the ENFORCE CONSTRAINT option.plz consult somebody about the use of it.it would be very huge a document to post it.

otherwise read one record at a time in a program and put inserts into the table , but it won;t be that efficient a technique.follow the first one for clarity n code opti.
Back to top
View user's profile Send private message
harish_mf

New User


Joined: 31 Jul 2005
Posts: 18
Location: bangalore

PostPosted: Fri Aug 12, 2005 2:19 pm
Reply with quote

hi all,

iam a mainframe user and i have some doubts.

how to convert vsam record into db2 , is there any presteps to be follwed for indexex and AIX.

if any one knows the answer plz send it to my personnel mail id,

***EMail ID REMOVED... Read Forum Rules***
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Sat Aug 13, 2005 9:58 am
Reply with quote

hi, you can check the attached file. Hope you will find some helpfull material in it.
Back to top
View user's profile Send private message
Karthikt

New User


Joined: 15 Aug 2005
Posts: 51

PostPosted: Mon Aug 15, 2005 11:01 am
Reply with quote

jayaprakashr wrote:
Hi,
how to convert VSAM file record into DB2.plz let me know icon_razz.gif icon_confused.gif [/b]


Hi,
I can find 2 methods for this problem.

1. Manual solution.
VSAM file can be considered as Indexed file. First find out whether the primary key of DB2 table and your VSAM file is same or not. If it is not same, then you copy the VSAM file into a FLAT FILE. Then define a VSAM file with record format such as like DB2 table and also keys as same as primary keys. Then load this new VSAM file from the flat file. You can read your VSAM file record by record and insert into the DB2 table. I am already having a utility program for this. If you want I will send you.

2. Automated solution.
Unload the data from the VSAM file in the record format as as same as the DB2 table. Write a control card for the DB2 table to load from the flat file into DB2. Then using the options DB2 table / 3.7/load from file option in mainframes, load the data into DB2 table using the flat file and control card.

Contact for information on this to ***EMail ID REMOVED... Read Forum Rules***
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Tue Aug 16, 2005 3:25 am
Reply with quote

Contents of VSAM file may not be ideal for DB2.

It seems to me that dump and load without the VSAM record fields being clearly defined and reviewed by a DBA for proper database design, integrity, validity and normalization, is simplistic and shortsighted.

Get proper documentation and a DBA involved.


Dave
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top