|
Rob, If you are wanting to print the total associated with a year/month combination you must first do a lookup on the year/month array. This will position it to the correct element of the array. You can then use the index to print the totals. IIRC the syntax would be something like this: C 1 LOKUP ARRAY1 X C EXCPT MTHTOT OPRINTER MTHTOT O ARRAY2,X Rick > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of simafrog > Sent: Wednesday, February 18, 2004 2:33 PM > To: RPG programming on the AS400 / iSeries > Subject: Array Index Processing > > > I built the table referred to earlier, as an alt. array. The > first part has the year/mo and the second part has the total > pieces shipped in this year/mo. There are 60 elements to this > array representing 5 years of totals. > The index is a bit tricky for me. In order to access say > April 2002, the match would be 0204. I would want to > print for example the array name, let us call it ARN but > indexed as in ARN,0204 causes an out of bounds error. > > I am obviously missing something important but what? > Thanks, > Rob
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.