ADDDFTRCD ADD DEFAULT RECORD TAADBJW |
The Add Default Record command allows the insertion of default
records at the beginning, the middle, or at the end of a physical
file. If the inserts occur before the end of the file, the relative
record numbers of the remaining records are shifted down to new
relative record numbers. The inserted record fields will be filled
with blanks or zeros.
You must have *ALL rights to the file to use ADDDFTRCD.
A typical command would be:
ADDDFTRCD FILE(xxx) ATRELRCD(10) NBRADD(3)
The processing would be:
** The first 9 records would be copied from the named file to a
work file in QTEMP.
** 3 default records would be added.
** The records beginning at relative record number 10 from the
named file would be added to the work file.
** The work file would be used to replace the named file.
The records that are inserted into the file are active records that
are filled with blanks or zeros. Any deleted records remain in the
file.
The inserted records may then be updated with a tool such as EDTDBF.
ADDDFTRCD escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
FILE The qualified name of the file to be inserted into.
The library value defaults to *LIBL. *CURLIB may
also be used.
ATRELRCD The relative record number where the inserts will be
placed. If a number is entered, that relative
record number and all those following would be
shifted down in the file (new relative record
numbers would be assigned).
The special value *END may be used to place the
inserts at the end of the file.
The number entered must be in a range of 1 -
999,999,999.
NBRADD The number of inserts to be made into the file. The
default is 1. Up to 99999 inserts may be made.
MBR The member of the file to be read and inserted into.
*FIRST is the default. *LAST may be specified.
Restrictions
------------
You must have all rights to the physical file to use ADDDFTRCD.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKOBJ3 Check object 3
EDTVAR Edit variable
RTVDBFA Retrieve data base file attributes
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
ADDDFTRCD *CMD TAADBJW QATTCMD
TAADBJWC *PGM CLP TAADBJWC QATTCL
|
Added to TAA Productivity tools June 1, 2002