Moving data between 2 iSeries Servers

2,480 pts.
Tags:
AS/400
COBOL
iSeries
iSeries Cobol programming
We have a Production iSeries and a Development iSeries. We want to be able to select data from our Production System and Transfer it to a programmers library on our Development System. When we were on a single system we used SQL/Cobol. We have been successful getting to the database on each system through the use of the SQL Connect statement, but can only Connect to one database at a time. The problem is where to store the data as we change connections. Any thoughts ? Thank You, Bill
ASKED: December 18, 2007  7:13 PM
UPDATED: March 8, 2010  8:31 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

If the goal is to transfer data to the development system for testing purposes then an easy way is to save the necessary objects to a *SAVF, FTP the *SAVF to the development system, and restore the objects to the development libraries. This can be easily automated if you want periodic updates to the development system and is the process I use across my systems. This has the added benefit of isolating production data from development errors.

There are many other ways to also accomplish this.

Bruce Vining
Bruce Vining Services

Bruce,
Thank You, already familiar with this process. We are using SQL/Cobol so we can select records based on key information from multiple files in order to create a test environment for our programmers. Our code goes something like
INSERT INTO PGMRLIB/FILEA
SELECT *FROM PRODLIB/FILEA
WHERE IDKEY = ‘Key#’
Again things worked great when production and development were on one system, our issue is Connecting to 2 databases, 1 on each system.

Thanks,
Bill

============================================================

It’s possible to connect easily to two different databases at the same time, but it requires a product to enable it.

In order to retrieve rows from one database and write into another with SQL yourself without additional products, you will need to code your SQL/COBOL using SQL CLI.

Tom

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Bigmac46
    I may be missing something but ; If the 2 can "talk" to each other have you tried DDM(s) ?
    1,000 pointsBadges:
    report
  • wpoulin
    Bicmac46, Thank You, Yes we have tried DDM. It works great if we are copying the whole file from 1 system to the other, such as using the CPYF command. But when we use SQL against a DDM defined file we get SQL7011 not a table, view or physical file. Thanks, Bill
    2,480 pointsBadges:
    report
  • Vatchy
    Have you explored the parameters of the CPYF command (using DDM) that allow you to select records? They won't match SQL for functionality but they still may do the trick.
    1,410 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following