Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to convert VSAM file record into DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to convert VSAM file record into DB2
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    Post subject:
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    Post subject: how to convert VSAM file record into DB2.plz let me know
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    Post subject: Re: How to convert VSAM file record into DB2
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    Post subject:
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    Post subject: Re: How to convert VSAM file record into DB2
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    Post subject: Re: How to convert VSAM file record into DB2
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: 247
Location: Cincinnati OH USA

PostPosted: Tue Aug 16, 2005 3:25 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us