TAA Tools
RTVNXTVER       RETRIEVE NEXT VERSION                  TAACLRR

The Retrieve Next Version  command allows the input of a  value such as
ABC001,  increments the digit  portion and  returns a value  of ABC002.
This  can  be  helpful when  an  application  is attempting  to  to add
another version.

A typical series of commands would be:

             DCL           &VERSION *CHAR LEN(10)
             DCL           &NEWVER *CHAR LEN(10)
              .
             RTVNXTVER     INPVAL(&VERSION) RTNVAL(&NEWVER)

If  the  &VERSION value  was  ABC00055,  the  &NEWVER  value  would  be
ABC00056.

The  INPVAL cannot  be all  blanks or  contain an  embedded blank.   It
must have at least one trailing digit and may be all digits.

The  INPVAL must allow  room for an  increment to occur.   For example,
ABC999 or A9 is invalid.

RTVNXTVER escape messages you can monitor for
---------------------------------------------

      TAA9891    The input value may not be all blanks
      TAA9892    The input value will cause an overflow

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

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

   INPVAL        The  input  value.    Up  to  10  characters  may   be
                 specified.

                 The value  may not  be all blank  or have  an embedded
                 blank.  All digits are valid.

                 The  value must have  at least one  trailing digit and
                 must allow an  increment to occur  without causing  an
                 overflow.    For  example,  a  value  such  as  ABC999
                 cannot be incremented without causing an overflow.

   RTNVAL        The  return incremented value.   It must  be specified
                 as *CHAR LEN(10).

                 If  the INPVAL is  ABC005, the RTNVAL  will be ABC006.

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

Because RTVNXTVER returns  a value, the command  may only be used  in a
CL program.

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

The following TAA Tools must be on your system:

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

   RTVNXTVER     *CMD                   TAACLRR       QATTCMD
   TAACLRRC      *PGM       CLP         TAACLRRC      QATTCL
					

Added to TAA Productivity tools July 15, 2006


Home Page Up to Top