TRNVAL          TRANSLATE VALUE                        TAACLQB

 The  Translate Value  command  provides a  command  front end  for  the
 QDCXLATE API.   TRNVAL allows a  simple translation of a  field using a
 translate table.

 A typical command use would be:

              DCL        &TRNVAL *CHAR LEN(1000)
               .
              TRNVAL     INPVAL(xxxx) TRNVAL(&TRNVAL) LENGTH(10)

 The  default for TRNVAL is to  use the system supplied QSYSTRNTBL table
 which translates from  lower to upper case.   Therefore, the result  of
 the  example would  be that  the  value in  TRNVAL would  be all  upper
 case.   The LENGTH  parameter describes the  length of the  field to be
 translated.

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

    INPVAL        The input value  to be translated.   It can  be up  to
                  1000 bytes in length.  The value is not changed.

    TRNVAL        The return translated  value.  It must  be declared as
                  *CHAR LEN(1000).

    LENGTH        The  length  to be  translated.   The  default  is 10.
                  The value  must be  between  1 and  1000.   The  exact
                  length is not  required, but a smaller  value improves
                  performance.   A  shorter length  only  translates the
                  number of characters specified.

    TRNTBL        The  qualified name  of the translation  table to use.
                  The  default  is   QSYSTRNTBL  which  is   the  system
                  supplied  table  that  converts  lower case  to  upper
                  case.  The library defaults to *LIBL.

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

 Because  the command returns a  variable, it can only  be executed 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
    ------        ----    ---------      ----------    ----------

    TRNVAL        *CMD                   TAACLQB       QATTCMD
    TAACLQBC      *PGM       CLP         TAACLQBC      QATTCL

Added to TAA Productivity Tools April 1, 1995


Home Page

Powered by AS/400Powered by AS/400 Last modified on July 15, 2010 © 1995, 2010 - Jim Sloan, Inc.