Create report in RPG for Jounaled PF

5 pts.
Tags:
Journaling (AS/400)
PF/LF
RPG
Hi Is there quick way to generate report for the changed fields in a jounaled PF. I have a PF which has over 50 fields and need to produce a report if any field is changed or added new value.Thanks
ASKED: August 29, 2008  7:23 PM
UPDATED: August 29, 2008  10:17 PM

Answer Wiki

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

I don’t believe this will be easy but if you are capturing before and after images then it’s not as bad as it might be
1. You will have to use DSPJRN to write the entries to a DBF (called DSPJRN below)
2. Your program needs two externally defined datastructures based on the file in question
BeforeDS with prefix ‘B_’ and AfterDS with prefix ‘A_’
3. read the before and after records from DSPJRN moving one to beforeDS and the other to afterDS
4. Write the code to compare any b_ fields with the a_field and report the differences.

This is the procedure for a change, a write will only have an after and a delete will only have a before.

Phil

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