TAA Tools
CVTBINDEC       CONVERT BINARY TO DECIMAL              TAABINA

         **************************************************
         *                                                *
         *   The CVTBINDEC tool exists only for           *
         *    compatibility reasons with an old version   *
         *    in the QUSRTOOL tools.  It is no longer     *
         *    needed because CL now supports the          *
         *    %BIN function.                              *
         *                                                *
         **************************************************

The Convert Binary  to Decimal command converts  a binary 2 field  to a
decimal 5 field.

A typical command would be:

             DCL        &FROMBIN *CHAR LEN(2)
             DCL        &TODEC *DEC LEN(5 0)
              .
             CVTBINDEC  FROMBIN(&FROMBIN) TODEC(&TODEC)

CL  now  supports  the %BIN  function  which  is  more  efficient.   To
achieve the same results, you would specify:

             CHGVAR     &TODEC %BIN(&FROMBIN 1 2)

Command parameters                                    *CMD
------------------

   FROMBIN       The  binary  field  to be  converted.   It  must  be 2
                 characters in length.

   TODEC         The return  variable  with  the decimal  result.    It
                 must be specified as *DEC LEN(5 0).

Restrictions
------------

Because the  command returns a  variable, it can  only be used in  a CL
program.

Prerequisites
-------------

None.

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

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

   CVTBINDEC     *CMD                   TAABINA       QATTCMD
   TAABINAC      *PGM       CLP         TAABINAC      QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top