|
result = field1 + field2 + field3 + field4 + field5 + field6 + field7 + field8 + field9; Or you can setup a datastructure in the DSPECS that is dimmed. D DS D Field 1 81 0 Dim(9) D Field1 1 9 0 D Field2 10 18 0 D Field3 19 27 0 D Field4 28 36 0 D Field5 37 45 0 D Field6 46 54 0 D Field7 55 63 0 D Field8 64 72 0 D Field9 73 81 0 You can then either populate Field1-9 individual or use and Array index. Field1 = 1 + 2; Or Field(iX) = 1 + 2; Then when you want to total all fields you can... result = xFoot(Field); Michael Schutte Work 614-492-7419 email michael_schutte@xxxxxxxxxxxx steema@diskhaven. com Sent by: To rpg400-l-bounces+ "RPG programming on the AS400 / michael_schutte=b iSeries" <rpg400-l@xxxxxxxxxxxx> obevans.com@midra cc nge.com Subject tally of many fields 04/05/2006 03:10 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> HI I have to tally up 9 fields for some total. was wondering if in /FREE this is done in one statement, or need to do so the traditional method, 2 fields at a time. Thanks, Steve -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.