5 pts.
 Inserting DB2 records on iSeries to SQL Server 2005 Table
I need to insert records from a DB2 file residing on an iSeries to a SQL Server 2005 table on a remote system. How can I do this in a CL or RPG ? Thanks

Software/Hardware used:
ASKED: June 12, 2010  12:27 AM
UPDATED: June 20, 2011  2:37 PM

Answer Wiki:
Practically speaking, you almost certainly won't use CL nor RPG to do this. You'll use Java and JDBC. You would use ILE RPG to invoke the Java methods, though, and possibly use CL to call the RPG. Microsoft's implementation of ODBC was originally kind of a proprietary superset of a subset of the open DRDA specs. And AFAIK, the only driver MS has made available for i5/OS is their Type 4 JDBC driver. Tom
Last Wiki Answer Submitted:  June 14, 2010  9:26 pm  by  TomLiotta   108,360 pts.
All Answer Wiki Contributors:  TomLiotta   108,360 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

But it is really easy to pull them from the SQLserver side.
Phil

 44,220 pts.

 

…easy to pull them from the SQLserver side.

It sure helps when the database vendor provides drivers for other platforms, eh?

Tom

 108,360 pts.

 

actually i want to transfer data from db2 as400 to sql2005 automatically, and sql2005 will integrate with visual studio c#

 10 pts.

 

I have accomplished something similar in the past. I created a Linked Server for the AS400 on our 2005 SQL Server. Created a stored procedure that queries the DB2 table and inserts the data into the SQL 2005 table.
The process had to be executed daily, so I setup a SQL Server Agent job with a daily schedule, so that the stored procedure would run daily.
This would probably work if you just needed to obtain the data on a scheduled interval.

 20 pts.