DTRHELP.HLB  —  Commands Statements Clauses, SORT Statement, Examples
       The following example sorts the first ten yachts by the ratio of
       PRICE to DISPLACEMENT:

       DTR>  FIND FIRST 10 YACHTS
       [10 records found]
       DTR>  SORT BY PRICE/DISP
       DTR>  PRINT ALL TYPE, PRICE, DISP,
       [Looking for next element in list]
       CON>  PRICE/DISP ("$/LB."/"RATIO") USING $$$.99

                                              $/LB.
       MANUFACTURER   MODEL     PRICE  WEIGHT RATIO

        BLOCK I.    40                 18,500   $.00
        BUCCANEER   270                 5,000   $.00
        ALBERG      37 MK II   $36,951 20,000  $1.85
        AMERICAN    26          $9,895  4,000  $2.47
        BOMBAY      CLIPPER    $23,950  9,400  $2.55
        AMERICAN    26-MS      $18,895  5,500  $3.44
        BAYFIELD    30/32      $32,875  9,500  $3.46
        ALBIN       VEGA       $18,600  5,070  $3.67
        ALBIN       BALLAD     $27,500  7,276  $3.78
        ALBIN       79         $17,900  4,200  $4.26

       DTR>

       The following example forms a collection of FAMILIES CROSS KIDS
       and sorts the collection by decreasing age of the children:

       DTR>  FIND FIRST 6 FAMILIES CROSS KIDS
       [6 records found]
       DTR>  SORT BY DESC AGE
       DTR>  PRINT ALL FATHER, MOTHER, EACH_KID

                                KID
         FATHER     MOTHER      NAME    AGE

       JIM        LOUISE     ANNE       31
       JIM        LOUISE     JIM        29
       JIM        LOUISE     ELLEN      26
       JIM        LOUISE     DAVID      24
       JIM        ANN        URSULA      7
       JIM        ANN        RALPH       3
Close Help