How to restore files to a different library

435 pts.
Tags:
AS/400
Recently this user wrote the editors at Search400.com with this question: "I'm trying to restore files (which are currently journeyed) to a different library, but I don't want them to be journaled, as I'm just using them for testing. Once I've restored them, I have to stop the journalling for each of these files. Is there a quick way to do it?" Does anyone have any ideas? -- Michelle Davidson, editor, Search400.com

Answer Wiki

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

Write a CL with the library name being passed to it. Do a DSPOBJD OBJTYPE(*FILE) to an output file for that library. Process that file and do an ENDJRNPF on each physical file.

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

The solution is not to restore the files. Use CPYF MBROPT(*REPLACE) CRTFILE(*YES) instead. If they are SQL tables, use INSERT with SELECT from the originals.

A “restore” is designed to recreate things as they were when saved. Don’t use it if that’s not what you want done.

Tom

Discuss This Question:  

 
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

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