Appending data into an existing AS400 physical file

750 pts.
Tags:
Appending records into another file on iSeries
I want to add (append) records into an existing iSeries physical file using command RSTOBJ. The data is coming from one library and being added into a file in a different library. I have a file  in library DATA2008 and the file is called CS046M24. There is a file in library JEFFLIB called CM091MOLD. I want to add/append the data in file CS046M24 into file CM091MOLD. What are the right parameter entries for the command?
1

Answer Wiki

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

I agree with Raven on the CPYF option for appending the data. What is the reason for doing the restore? If the file was damaged or there was another issues you may still risk missing data due to the cap in when the files was backed up till the problem was noticed. You may also possibly loading duplicate records in the case of unique records with changing timestamps. This may even cause for headaches for you. More details on what happened and why you are choosing this recovery method. 

Discuss This Question: 2  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.
  • ToddN2000
    Post your RSTOBJ command so we can see what you currently have.. There could be issues if the file was backed up on one release version and trying to restore on another release.  What release are you currently running? Check out the IBM RSTOBJ help page here 
    132,690 pointsBadges:
    report
  • TheRealRaven
    Since RSTOBJ doesn't "append" to an existing file, there is no good answer. You'd first restore the saved file, then copy those records to add them to the second file.

    Can you describe the actual business problem you need to solve? Is there a reason you can't simply use CPYF with MBROPT(*ADD)?
    35,070 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.

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

Following

Share this item with your network: