|
Would swapping key 3 & 4 give you a big help? key by column 1, 2, 4, and then column 3. It seems to me that your logical is badly formed for this particular purpose. I like the cycle so I would use an L1 break on all 4 fields, and write a record at L1 time. At L1 total time (except the first cycle) and then also L1 detail time. Also you mentioned there are two files. I'd process the second file as IS (Input Secondary) and use MR on the 4 key fields. Be sure to set L1 on those ke fields, too, if you go this route. This uses the cycle to process the two files as one, in key order, without any need to deal with the issue by you. I understand that newer methods give good performance times, but as yet I have never seen anything that is reliably faster than the RPG cycle for reading through a huge file. As to the coding, this is maybe a 12 line program if you use the cycle? Maybe 15 lines, tops. Well... there'd be 10 I lines. So maybe its 25 lines of code, --------------------------------- Booth Martin http://www.martinvt.com --------------------------------- -------Original Message------- From: RPG programming on the AS400 / iSeries Date: 08/19/05 11:01:43 To: RPG programming on the AS400 / iSeries Subject: RE: a need for speed this is similar to the sql that Rick sent earlier. It probably would not give me the result I wanted. Below is an example of detail record and what the result needs to be: Detail record 601 123 0001 JSN 601 123 0002 JSN 601 123 0003 JSN 601 123 0004 JSN 601 123 0006 BTD 601 123 0010 BTD 601 123 0011 JSN 601 123 0030 BTD 601 123 0044 BTD 601 123 0091 JSN 601 123 0092 JSN The result needs to be: 601 123 BTD 0006 - 10 601 123 BTD 0030 - 44 601 123 JSN 0001 - 04 601 123 JSN 0011 - 11 601 123 JSN 0091 - 92 -----Original Message-----
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.