How to get the old file data into a new file

1420 pts.
Tags:
AS/400
RPG
RPG Programs
In my existing application, some RPG programs are reading the data of two different files (Old files) and using that data for comparison purpose in these RPG programs. Now I need to use a different file (New file) instead of the old files. But the new file has to get the data from these old files on matching a primary key field (Common Field in all the 3 files). Remaining fields are different in terms of size and type. How to get the old files data in this case into the new file in this scenario? Please reply me ASAP. Thanks!

Software/Hardware used:
AS400, RPG 400,CLLE,

Answer Wiki

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

Discuss This Question: 4  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
  • TomLiotta

    Remaining fields are different in terms of size and type.

    Size doesn't matter as long as fields get larger. But types can be a problem. What are the changes in types that you know about?

    Tom

    125,585 pointsBadges:
    report
  • ToddN2000

    What are the current keys on the files in question? If key field types have changed you may have a tougher time. You may need to create a new logical or temporary view. Is this just for retrieving data or are there updates being done on the older files?

    8,335 pointsBadges:
    report
  • philpl1jb

    And are there any field names that are the same between the files?

     

    49,550 pointsBadges:
    report
  • TomLiotta

    It shouldn't matter if key fields are different since the files are different. Key fields will be handled the same as other fields. Field name changes, though, would be a reason why CPYF couldn't be used, as would some particular changes in data types.

    If no field names have changed and data types and sizes are compatible, then CPYF would be all that's needed. Otherwise, it'll take an INSERT taking its values from a SELECT at the least and perhaps a program at the most.

    But without more info, we can't tell.

    Tom


    125,585 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