Why not just use a array and look for a changed character and print a line
or something below it  or using an array print out just the changed chars
and not bother with having actual field names and positions?? You could
include on the report a document id to view that contains the full layout.
You could provide a starting position for the change data to indicate where
the data starts give or take the odd character position.

This should make it more generic for a few files.


Hope this helps






Kmh0421@aol.com on 13/07/99 16:49:39

Please respond to RPG400-L@midrange.com

To:   RPG400-L@midrange.com
cc:    (bcc: Nick England/Pacific/UK)
Subject:  audit report




Hello to all. I am currently writing a report that prints all records for a
customer from several files. Actually, instead of journalling, my customer
created an 'audit' file for each of their major files. There are
transaction
types of add, change before, change after and delete. Each audit file has
different fields, they are carbon copies of their original PF. This report
is
supposed to show only changed fields (with field descriptions), before and
after. What I am in the process of doing is this:
In the CLP, I DSPFFD to an outfile of all of the files. In the RPG, I read
this file and load an array with field names and descriptions. I read
through
address book (customer master), and go out to each audit file to see if
there
are changes for that day for that customer. The report has misc header
info,
but the detail is only 4 fields... Type, Field Description, Before, After.
If
there are records in a file for a given day, and it is an add or delete
record, I just print it in the before or after column. If change, I check
each field in the change before against the change after record, and print
only the 'changed' fields. So, far, I have just one file in the RPG, and I
am
in the process of adding about six more. The code is already over 2000
lines..... At the very least, I am going to need to create a program for
everyfile, and somehow share the printfile so that each program can write
detail records to same report. Overall, although this is going to work, I
can
help but think there must be a better way. Any ideas? Thanks in advance,
especially if you even read this far!!! Kathie
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



      Regards,
      Nick England

      Catalyst Solutions plc
      Kingfisher House
      Frimley Business Park
      Camberley
      Surrey
      GU16 5SG
      UK

      http://www.catalyst-solutions.com
      Email: Nick.England@catalyst-solutions.com

      Telephone: +44 1276 808800
      Facsimile: +44 1276 808841
      CN=Helpdesk 'phone:/O=44 1276 808999
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].