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
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 TomLiotta108,360 pts.
All Answer Wiki Contributors: TomLiotta108,360 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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.
But it is really easy to pull them from the SQLserver side.
Phil
…easy to pull them from the SQLserver side.
It sure helps when the database vendor provides drivers for other platforms, eh?
Tom
actually i want to transfer data from db2 as400 to sql2005 automatically, and sql2005 will integrate with visual studio c#
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.