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.
Last Wiki Answer Submitted: September 24, 2010 12:00 am by TomLiotta107,735 pts.
All Answer Wiki Contributors: TomLiotta107,735 pts.