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

Move part of data from db2 tables to sqlserver tables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akumar

New User


Joined: 12 Jan 2007
Posts: 8
Location: bangalore

PostPosted: Thu Sep 20, 2007 4:34 pm
Reply with quote

Hi all,
In our project we have a requirement where we need to move part of data from db2 tables to sqlserver tables.we are using DSNUPROC and DSNTIAUL utility to unload data from db2 and using sql server export,import wizard to load data into the sql server 2005.
now the db2 has its native datatype like time stamp,etc which where not in sql server and also using DSNUPROC utility integer column is converted to Character(iam using external keyword or else data will be in compressed format which is not readable,and is not understandable by sql server ) .
now the issue is this character data i am loading as integer in sql server because of that record length is mismatching. and data loading is failing in sql server.any pointers regarding this will be highly helpful.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Sep 21, 2007 12:49 am
Reply with quote

Hello,

Please provide some detail information.

Show the data before the ftp/other download to the win-based system.

Show the unload control statements from db2.

You may need to insert a step between the unload and the data trqnsfer. You might also consider writing code to create the download file and then you can ensure all of the data is in windows-friendly formats.

From experience, if you create a simple text file with delimiters, the import into sqlserver becomes trivial.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 631
Location: Wisconsin

PostPosted: Fri Sep 21, 2007 5:12 am
Reply with quote

Just a different though, could you have a program (java?) that reads that data directly from DB2 on a Windows machine and writes it straight into SQL Server?

Not the ideal solution if you are moving lots of data often because you are doing row by row inserts after the reads, but since you would be manipulating the data in your code anyway to make it SQL server friendly, just throw the insert in also.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Structured Data and Nested Loops via ... COBOL Programming 0
No new posts Question regarding ISPF tables with T... TSO/ISPF 11
No new posts Alternate key data extracttion COBOL Programming 13
Search our Forums:


Back to Top