DTRHELP.HLB  —  Commands Statements Clauses, SCALE Clause
       Establishes explicitly the scale factor to be applied to the
       value stored in the field.

       Format

         SCALE  [IS]  [-]integer

1  –  Arguments

    - (minus sign)

       Is an optional minus sign to indicate a negative scale factor.

    integer

       Indicates the number of decimal places the implied decimal point
       is from the right or left end of the value stored in the field.

2  –  Examples

       The following example uses a positive scale factor to store a
       large number in a small field:

       03 BARRELS_PER_DAY WORD
          SCALE 6
          EDIT_STRING Z(5)" Million".

       The following example uses a negative scale factor to store a
       minute number in a small field:

       03 PROJECT.
          05 PROBABILITY_OF_FINISHING.
             07 EVER DEFAULT VALUE IS 1
                PIC 99 SCALE -2.
             07 ON_TIME 99 SCALE -6
                MISSING VALUE 0
                EDIT_STRING 0.9(6)?"Better late than never".
Close Help