Thanks! We'll email you
when relevant content is
added and updated.
I am developing an utility for logging the changes made to a PF. The file has 20 fields in it. Currently, i am writing logic like below -
D File E DS EXTNAME(File1)
D P_File E DS EXTNAME(File1) Prefix(P_)
C If Field1 <> P_Field1
C Eval BeforeImage = P_Field1
C Eval AfterImage = Field1
C Eval Comment = 'Field1 changed'
C If Field2 <> P_Field2
C Eval BeforeImage = P_Field2
C Eval AfterImage = Field2
C Eval Comment = 'Field2 changed'
Similarly, performing write for all 20 fields. The program works fine. But, what I would like to understand is if there is an efficient way to write this code? (By avoiding any repetitions)