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



CarollaT@xxxxxxxxxxxxxx wrote:
> 
> 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)
> ...
> 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, the possible problem with this approach is that your numeric data
won't be sorted by its natural order because it would be sorted by its
hex value, and the sign is at the end. If the first subfield had values
-9, -8, -7, 7, 8, 9 the elements would be sorted to -7, 7, -8, 8, -9,
9.  A similar problem can happen with dates if they aren't in *ISO
format.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.