I'm coming (fashionably) late to the party to add my 2 cents...
First-- when you retrieve a journal entry for the "File of Interest"
you have the 'raw' entry-- a bunch of journal fields (time-date-user
who did it-etc) plus the fields from the original file. But as a
I think others have shown the data structure with the journal fields
and a space for 'your fields go here.'
You create a file to match that data structure-- journal fields + the
fields in the original file, then CPYF from the retrieved journal
entries to this file FMTOPT(*NOCHK). This is about the =ONLY= time
I'll allow a *NOCHK! It just runcates anything in the journal record
you don't need.
As you've noticed, this is primarily a batch process.
However, IBM has another command, RCVJRNE, which allows you to tell
IBM's journal processor to hand you a copy of every journal for a
list of files as they're being written to the journal receiver! This
allows near real-time processing of the journal entries. No more
scanning all of the journal receivers for the whole day as a batch
and search for CBX902 for the first
part of the sample code; the rest is mentioned on the page.
There's a link to the file with the source code.
--Paul E Musselman