|
I have a program that builds a data warehouse of sorts on our iSeries. Most of this data was coming from the iSeries until recently, when we moved our imaging to the Windows platform. I am trying to get a simple list of elements from an SQL server 2005 database into an iSeries table, using RPG, DTS, or whatever tool I need. This will be used by my RPGIV build program to build the warehouse records for reporting. My first attempt was to simply create a view on the SQL server with the data, create a table on the iSeries, and set up a DTS package on the SQL Server to pass the data from the view to the physical file. The problem is that the SQL server doesn't understand the format of packed or zoned fields, and cannot map the fields from the view to the fields in the table. I know that, inside an RPGIV program, you can use the I and U data types, and these correspond to INT and LONG types in the PC world, but how to accomplish this when the destination is a table on the iSeries, and not a program? I am asking for suggestions in accomplishing this. The options I can think of are: 1) Turn the numeric fields into character in the SQL view, pass them as char, then convert inside the RPGIV program 2) Use CLI SQL to fetch the data from the view into a temporary table on the iSeries 3) Write a procedure/batch file to extract a CSV, and import to iSeries table. Any suggestions would be helpful. Thanks! -- "Enter any 11-digit prime number to continue..."
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.