Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Transferring data from an AIX box to the iSeries

I need to transfer data from an AIX box to the iSeries. I have been able to do this using interactive SQL with DRDA. I want to create code to run this transfer in batch, but can't figure out how to control or specify session attributes to write to an outfile on the local database. Can you help?

Instead of you writing a tool, IBM does have a product called DB2 DataPropagator that uses DRDA to perform the functionality that you describe -- including scheduling of the data transfer.

If you want to write your own tool, then you need to embed SQL in a high-level language program and call that program in batch. As you've experienced, a single SQL statement using DRDA can only reference database objects from one database server at a time. Your tool would have to do steps similar to what interactive SQL does with DRDA. Select & fetch data from the AIX server into data structures (i.e. array) in your OS/400 program and then use those populated structures to perform an SQL Insert statement into your local database. You will want to use blocked fetches & inserts to get the best performance.

Next Steps

Search400.com's targeted search engine: Get relevant information on DB2/400

The Best Web Links: tips, tutorials and more

Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close