× 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.



I have a situation where I am using a data structure array, like this:

     D DispItems       DS                  Qualified Dim(5000)
     D  Insurance                     5S 0 Inz(0)
     D  Family                        9P 0 Inz(0)
     D  Member                        2S 0 Inz(0)
     D  Claim                         4P 0 Inz(0)
     D  Assigned                       D   Inz(*Loval)

After gathering and populating the array, I must show a sub-file for
user-selection, summarizing the elements in the array by the Insurance
field.  I wanted a way to sort the array (SORTA), but being a data
structure, that won't work.  So I started reading the sorc guide on qsort,
then a better idea occurred to me:

Set up a simple array, like this:

     D DispArray       S             25A   Dim(5000) DESCEND

Then, remove the 'Dim(5000)' from the data structure, and use it like a
model to populate as I need to assign/retrieve data elements out of the
array.  Basically, as I am stepping through the array, I EVAL the selected
array element into the data structure 'model', then address each field of
the data structure.  Once updated, I EVAL the data structure back into the
array element.  

So SORTA works on the DispArray array now.  In your opinion, is this a good
idea?  Is this more or less efficient than using qsort?  

Tony Carolla
MedAmerica Billing Services, Inc.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.