DTRHELP.HLB  —  Commands Statements Clauses, ALLOCATION Clause, Example
       The following example shows the use of the ALLOCATION clause with
       the YACHT record:

       DELETE YACHT;
       REDEFINE RECORD YACHT OPTIMIZE
       ALLOCATION IS LEFT_RIGHT
       01 BOAT.
         03 TYPE.
            06 MANUFACTURER PIC X(10)
               QUERY_NAME IS BUILDER.
            06 MODEL PIC X(10).
         03 SPECIFICATIONS
            QUERY_NAME SPECS.
            06 RIG PIC X(6)
               VALID IF RIG CONT "SLOOP","KETCH","MS","YAWL".
            06 LENGTH_OVER_ALL PIC XXX
               VALID IF LOA BETWEEN 15 AND 50
               QUERY_NAME IS LOA.
            06 DISPLACEMENT PIC 99999
               QUERY_HEADER IS "WEIGHT"
               EDIT_STRING IS ZZ,ZZ9
               QUERY_NAME IS DISP.
            06 BEAM PIC 99 MISSING VALUE IS 0.
            06 PRICE PIC 99999
               MISSING VALUE IS 0
               VALID IF PRICE>DISP*1.3 OR PRICE EQ 0
               EDIT_STRING IS $$$,$$$.
       ;
Close Help