|
Kathie, You may also want to consider using SQL for this type of report. Depending on how you have set up your files, it could be very easy. To use SQL you would need a left outer join and a union with an exception join. This will simulate matching record. The other thing that would help is the describe clause. You can use this to retrieve information about what is being selected. You can also access the system files in SQL without worrying that their format will change. Let me know if this sounds like a viable alternative and I will post more information. David Morris >>> <Kmh0421@aol.com> 07/13/99 09:49AM >>> 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.