× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>From: "Wills, Mike N. (TC)" <MNWills@taylorcorp.com>
>Date: Thu, 6 Sep 2001 17:06:23 -0500
>
>Okay, for some reason I can't remember how to do this. I need to count the
>number of people for each age that work within the company (for
demographics
>stuff). The problem is that I forgot how to deal with multiple arrays.
>
>The way I am doing this (...and I am open to better ways) is to create a
>multi-column array that holds the age and the count. When I process an
>employee, I will lookup to see if the age is in the array.
>...

Mike, in this case you don't need a 2-column array, but if you did, the
way to do it is with overlay arrays:

D  emplInfo     ds
D     emp                     dim(whatever)
D       age            10i 0  overlay(emp : *next)
D       id_num         10i 0  overlay(emp : *next)
D       name          100a    overlay(emp : *next)

age, id_num and name are all arrays.  If you sort by any one of these
arrays, the whole emp array gets sorted.  So you can sort or search
the whole array using any of the overlay arrays as a key.

Barbara Morris



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.