× 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 would like to sort the following array on the first 7 fields i.e. from
WWBCD through WATNNB. Is it possible using SORTA ??? 

Yes - it should be work with a group field.  The following example verifies
so it should compile etc. but I have no time to test it.

If you have this kind of requirement on an regular basis I would take the
time to learn qsort if I were you.  There are limits to what groups fields
can do with Sorta.

This is what it should look like:

     D wItmDtlDS       DS                  Inz 
     D wItmDtl                             Dim(250) 
     D  first7                             Overlay(wItmDtl)
     D    wwbcd                       3a   Overlay(first7) 
     D    wwccd                       2a   Overlay(first7:*NEXT)
     D    wjtce                       1a   Overlay(first7:*NEXT)
     D    walnb                       6s 0 Overlay(first7:*NEXT)
     D    wbdnb                       3s 0 Overlay(first7:*NEXT)
     D    waonb                       4s 0 Overlay(first7:*NEXT)
     D    watnb                       3s 0 Overlay(first7:*NEXT)
     D  wgncd                         4a   Overlay(wItmDtl:*NEXT)
     D  wexpc                         4s 2 Overlay(wItmDtl:*NEXT) 
     D  wpvat                         1a   Overlay(wItmDtl:*NEXT) 

      /Free
        sorta first7;  // Sort first seven fields

        sorta waonb;   // Just sort one within the group of 7 (Canadian
reference!)

Jon Paris
Partner400

www.Partner400.com 


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.