Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 252
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us