Apply Journal Change to Object of Different Lib

5 pts.
Tags:
AS/400
AS/400 Library
AS400 physical file
Journaling
Physical File
I got PF obj, in two Libs. I want to apply change into the second obj using the journal entries of first object. How can I do it??

Software/Hardware used:
AS/400

Answer Wiki

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

It must be done indirectly.

You can write a program to receive the journal entries into a data structure and then execute whatever function is indicated by the journal entry type — entry type PT would indicate a WRITE, UP would indicate UPDATE, etc.

Or you might use DSPJRN to display entries to an outfile. The JOESD field in the outfile can be used as a record-image. CPYF FMTOPT(*NOCHK) can copy those images into a file that is duplicated from the original file format.

If necessary, you can use CREATE VIEW to have a LF that only includes the JOESD field. CRTDUPOBJ will give you an empty file with the format of the original file. The view can then be copied into your duplicate with the CPYF command.

From there, you can apply the records to your file in any way you can imagine. It’s possible that you could even use CPYF MBROPT(*UPDADD) and get it done with no actual programming at all.

Tom

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.

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
  • Lovemyi
    Or you could look for Larry Youngren's excellent presentation on "Mirroring on a Shoestring". Larry is the recently retired IBM head of journalling and commitment control and has presented this presentation at Common and other local users groups. He explains with examples how to do this as part of the mirrroring process instead of buying the expensive mirroring packages from on of the vendors. the trick is to apply the journal changes to another file instead of the original. I think it will work in this case as well. You might also try to google within IBM on presentations with this title. Hope this helps. Lovemyi
    2,310 pointsBadges:
    report
  • TomLiotta
    Larry Youngren's initial concept can be found in Disaster Recovery on a Shoestring. It can be very useful when you have two systems with libraries and files of the same names. 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