TAA Tools
CVTDECBIN       CONVERT DECIMAL TO BINARY              TAABINB

         **************************************************
         *                                                *
         *   The CVTDECBIN 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 command converts a decimal  field (up to
5  digits) to  a 2  byte character  field which  will contain  a binary
value.

A typical command would be:

             DCL        &FROMDEC *DEC LEN(5 0)
             DCL        &TOBIN *CHAR LEN(2)
              .
             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 2) &FROMDEC

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

   FROMDEC       The  decimal field  to  be  converted.    It  must  be
                 specified as 0  decimals and can be up  to 5 digits in
                 length.

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

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

   CVTDECBIN     *CMD                   TAABINB       QATTCMD
   TAABINBC      *PGM       CLP         TAABINBC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top