5 pts.
 Apply Journal Change to Object of Different Lib
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
ASKED: September 23, 2010  12:10 PM
UPDATED: September 25, 2010  1:11 AM

Answer Wiki:
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
Last Wiki Answer Submitted:  September 24, 2010  12:00 am  by  TomLiotta   107,735 pts.
All Answer Wiki Contributors:  TomLiotta   107,735 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.

 

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

 107,735 pts.