TAA Tools
RTVDECARA       RETRIEVE DECIMAL DATA AREA             TAAARAT

The  Retrieve Decimal  Data  Area  command  retrieves the  value  of  a
decimal data  area without knowing  the length or  decimal positions to
a  *CHAR LEN(17)  variable.   A minus  sign may  precede the value.   A
decimal format character  will exist if  decimal positions are  defined
for the data area.

The  system command  RTVDTAARA is  very  restrictive when  a *DEC  data
area  has  a  number  of  decimal  positions.    Some  general  purpose
solutions may not work depending on what the value is.

RTVDECARA  allows  a  general  purpose  solution  for  determining  the
value.  It  uses DSPDTAARA to a  spooled file and reads  the VALUE from
the spooled file.

A typical series of commands would be:

             DCL        &RTNVALUE *CHAR LEN(17)
              .
             RTVDECARA  DTAARA(xxx) RTNVALUE(&RTNVALUE)

The  return value may  have a leading  minus sign and  a decimal format
character.

RTVDECARA escape messages you can monitor for
---------------------------------------------

      TAA9891    The data area is not a *DEC types

Escape messages from based on functions will be re-sent.

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

   DTAARA        The qualified name of  the *DEC type  data area to  be
                 retrieved.   The library value  defaults to *LIBL.   A
                 specific library or *CURLIB may also be used.

   RTNVALUE      The  value to  be returned.   It  must be  declared as
                 *CHAR  LEN(17).  It may have  a leading minus sign and
                 a decimal format character.

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

Because RTVDECARA returns a  variable, the command may only be  used in
a CL program.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     RSNLSTMSG       Resend last message
     RTVDTAARAD      Retrieve data area description
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RTVDECARA     *CMD                   TAAARAT       QATTCMD
   TAAARATC      *PGM       CLP         TAAARATC      QATTCL
					

Added to TAA Productivity tools October 15, 2010


Home Page Up to Top