TAA Tools
CVTTMP          CONVERT TEMPERATURE                    TAATMPE

The Convert  Temperature command  converts from  Fahrenheit to  Celsius
or from  Celsius to Fahrenheit.  The  command may only be used  in a CL

A typical series of commands would be:

             DCL        &FROMTEMP *DEC LEN(6 2)
             DCL        &TOTEMP *DEC LEN(7 2)

This  would  convert  the  FROMTEMP  Fahrenheit  value  to  the  TOTEMP
Celsius value.

Command parameters                                    *CMD

   FROMTEMP      The  From   temperature   in  either   Fahrenheit   or
                 Celsius.  A range of -9999.99 to 9999.99 is valid.

   TOTEMP        The  return value  in  either  Fahrenheit or  Celsius.
                 The variable must be declared as *DEC LEN(7 2).

   FROMTYPE      The  type of the FROMTEMP value.   The default is *FAH
                 for  Fahrenheit.    *CEL  must  be  specified  if  the
                 FROMTEMP value is Celsius.


Because the  command returns  variables, it  may only be  used in  a CL

Some  rounding  differences  may  occur  as  only integer  results  are
provided.   For example,  a value  of 20  Fahrenheit produces  a -7  in
Celsius, but a -7 in Celsius produces a 19 in Fahrenheit.




None, the tool is ready to use.

Objects used by the tool

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   CVTTMP        *CMD                   TAATMPE       QATTCMD
   TAATMPEC      *PGM       CLP         TAATMPEC      QATTCL

Added to TAA Productivity tools March 1, 1998

Home Page Up to Top