|
Someone had a good idea with the matching records. I'd like to save you some time in setup. Forget DSPFFD. That is a big waste of time. Any release after V2R3 has several files on disk that, (if you are like us and have SEVERAL copies of BPCS on a system), can eat huge quantities of disk. You might as well use these new files. They have all the information that DSPFFD has, and then some. Do a WRKF QADB* for a list of these files. QADBIFLD might be the one you want. For example: SELECT DBIFLD, DBIITP, DBITYP, DBITXT FROM qadbifld WHERE DBILIB='GPIDIVF' and DBIFIL='IIM' FIELD INTERNAL FIELD FIELD NAME TYPE TYPE TEXT IID A CHAR Record ID; IM/IZ IPROD A CHAR Item Number IDESC A CHAR Item Description IADJ P DECIMAL Month to Date Adjustments IRCT P DECIMAL Month to Date Receipts IISS P DECIMAL Month to Date Issues ... Want to change a field? Try: select DBILIB, DBIFIL from QADBIFLD where DBIFLD = 'MANAGR' LIBRARY FILE NAME NAME ACCTINTRFC FREF ACTATJO FREF ACTINTF FREF ACTINTO FREF ACTINT40 ACTINTCDO ACTINT40 FREF ACTINT404 FREF DPDLUCF30 FREF MGRTEST002 EMPJOB ELPFILE FREF MGRTEST099 EMPFLUFF ... Kmh0421@aol.com on 07/13/99 11:18:21 AM Please respond to RPG400-L@midrange.com@Internet To: RPG400-L@midrange.com@Internet cc: Fax to: 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.