TAA Tools
CVTDECBIN4      CONVERT DECIMAL TO BINARY 4            TAABIND

         **************************************************
         *                                                *
         *   The CVTDECBIN4 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 Decimal  to Binary 4  command converts a decimal  field (up
to 9  digits) to a 4  byte character field which will  contain a binary
value.

A typical command would be:

             DCL        &FROMDEC *DEC LEN(9 0)
             DCL        &TOBIN *CHAR LEN(4)
              .
             CVTDECBIN  FROMDEC(&FROMDEC) TOBIN(&TOBIN)

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

             CHGVAR     %BIN(&TOBIN 1 4) &FROMDEC

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

   FROMDEC       The  decimal field  to  be  converted.    It  must  be
                 specified  0 decimals.   The  number of  digits cannot
                 exceed 9.

   TOBIN         The  character field  which will contain  the returned
                 binary value.  It must  be specified as *CHAR  LEN(4).

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
   ------        ----    ---------      ----------    ----------

   CVTDECBIN4    *CMD                   TAABIND       QATTCMD
   TAABINDC      *PGM       CLP         TAABINDC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top