*****************************************
      * Program name: convfuncs.cbl
      * This program provides examples of 
      * conversion function usage in expressions.
      *
      * Copyright 2000 Deskware, Inc.
      *****************************************
 
       1 conv_input          pic ZZZ9.999.
       1 conv_output         PIC ZZZ9.999.

       MOVE 13.35 TO conv_input.
       COMPUTE conv_output = CALTOJ(conv_input).
       DISPLAY conv_input & ` calories is           `  & conv_output  & ` Joules.`.

       MOVE 1100 TO conv_input.
       COMPUTE conv_output = CCTOCIN(conv_input).
       DISPLAY conv_input  & ` CCs is                `  & conv_output  & ` cubic inches.`.

       MOVE 65 TO conv_input.
       COMPUTE conv_output = CINTOCC(conv_input).
       DISPLAY conv_input  & ` cubic inches is       `  & conv_output  & ` CCs.`.  
 
       MOVE 10 TO conv_input.
       COMPUTE conv_output = CMTOIN(conv_input).
       DISPLAY conv_input  & ` centimeters is        `  & conv_output  & ` inches.`. 
     
       MOVE 0 TO conv_input.
       COMPUTE conv_output = Ctofahr(conv_input).
       DISPLAY conv_input  & ` degrees Celsius is    `  & conv_output  & ` degrees Fahrenheit.`. 

       MOVE 212 TO conv_input.
       COMPUTE conv_output = fahrtoc(conv_input).
       DISPLAY conv_input  & ` degrees Fahrenheit is `  & conv_output  & ` degrees Celsius.`. 

       MOVE 328 TO conv_input.
       COMPUTE conv_output = ftom(conv_input).
       DISPLAY conv_input  & ` feet is               `  & conv_output  & ` meters.`. 

       MOVE 20 TO conv_input.
       COMPUTE conv_output = galtol(conv_input).
       DISPLAY conv_input  & ` gallons is            `  & conv_output  & ` liters.`. 

       MOVE 28 TO conv_input.
       COMPUTE conv_output = gmtooz(conv_input).
       DISPLAY conv_input  & ` grams is              `  & conv_output  & ` ounces.`. 

       MOVE 100 TO conv_input.
       COMPUTE conv_output = hptokw(conv_input).
       DISPLAY conv_input  & ` horsepower is         `  & conv_output  & ` kilowatts.`. 

       MOVE 12 TO conv_input.
       COMPUTE conv_output = intocm(conv_input).
       DISPLAY conv_input  & ` inches is             `  & conv_output  & ` centimeters.`. 

       MOVE 10 TO conv_input.
       COMPUTE conv_output = jtocal(conv_input).
       DISPLAY conv_input  & ` Joules is             `  & conv_output  & ` calories.`. 

       MOVE 95 TO conv_input.
       COMPUTE conv_output = kgtopd(conv_input).
       DISPLAY conv_input  & ` kilograms is          `  & conv_output  & ` pounds.`. 

       MOVE 10 TO conv_input.
       COMPUTE conv_output = kmtoml(conv_input).
       DISPLAY conv_input  & ` kilometers is         `  & conv_output  & ` miles.`. 

       MOVE 100 TO conv_input.
       COMPUTE conv_output = kwtohp(conv_input).
       DISPLAY conv_input  & ` kilowatts is          `  & conv_output  & ` horsepower.`. 

       MOVE 52 TO conv_input.
       COMPUTE conv_output = ltogal(conv_input).
       DISPLAY conv_input  & ` liters is             ` &  conv_output  & ` gallons.`. 

       MOVE 100 TO conv_input.
       COMPUTE conv_output = mltokm(conv_input).
       DISPLAY conv_input  & ` miles is              ` &  conv_output  & ` kilometers.`. 

       MOVE 400 TO conv_input.
       COMPUTE conv_output = (mtof(conv_input))/3.
       DISPLAY conv_input  & ` meters is             ` &  conv_output  & ` yards.`. 

       MOVE 16 TO conv_input.
       COMPUTE conv_output = oztogm(conv_input).
       DISPLAY conv_input  & ` ounces is             `  & conv_output  & ` grams.`. 

       MOVE 180 TO conv_input.
       COMPUTE conv_output = pdtokg(conv_input).
       DISPLAY conv_input  & ` pounds is             `  & conv_output  & ` kilograms.`.