ADDDTAARA ADD DATA AREA TAAARAB |
The Add Data Area command allows you to add a number to an existing
data area. You receive the new value back to your program.
A typical command would be:
ADDDTAARA DTAARA(xxx) RTNAMT(&RTNAMT)
The default adds one to the data area. The value returned is the
value before the addition takes place. An option allows you to
control whether the data area should be locked before making the
addition. For example, if multiple users will be updating the same
data area, it should be locked before making a change.
The data area must be created as *DEC LEN(9 0). Because the value
returned is the value before addition takes place, you should
initialize the data area with the number you want to start on.
TAA9891 will be sent as an escape message if the new value to be
placed in the data area exceeds 999,999,999.
Command parameters *CMD
------------------
DTAARA The qualified name of the data area to be updated.
The data area must be created as *DEC LEN(9 0). The
library defaults to *LIBL.
RTNAMT This is the value before the addition takes place.
It must be declared as *DEC LEN(9 0) in your
program.
ADDAMT The amount to be added. The default is 1.
ALLOCATE A *YES/*NO value for whether the data area should be
allocated before the addition occurs. The default
is *NO. Deallocation occurs after the addition. If
multiple users can update the same data area,
specify *YES.
WAIT The wait time if ALLOCATE(*YES) is specified. The
default is 30.
Restrictions
------------
Because the command returns a variable, the command 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
------ ---- --------- ---------- ----------
ADDDTAARA *CMD TAAARAB QATTCMD
TAAARABC *PGM CLP TAAARABC QATTCL
|
Added to TAA Productivity tools April 1, 1995