CPYWTHDLT COPY WITH DELETED RECORDS TAADBJJ |
The Copy with Deleted Records command provides a simple front end to
CPYF when a copy which includes the deleted records of the From File
is needed. Options for the beginning and ending relative record
numbers are provided. The command may be useful when working with or
testing applications that use relative record numbers.
Not all of the CPYF parameters are provided. The copy begins at a
relative record number (Key fields are not supported).
A typical command would be:
CPYWTHDLT FROMFILE(xxx) TOFILE(yyy) MBROPT(*REPLACE)
The file yyy would become a duplicate of file xxx including any
deleted records.
CPYWTHDLT may be used for a file that has no deleted records. A
diagnostic message does occur.
CPYWTHDLT escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent. Many
of these are resent from CPYF such as CPF2817 (CPYF failed - see
previous messages).
Command parameters *CMD
------------------
FROMFILE The qualified name of the file to be copied from.
The library value defaults to *LIBL. *CURLIB may
also be used.
TOFILE The qualified name of the file to be copied to. The
library value defaults to *LIBL. *CURLIB may also
be used.
If the file does not exist, a library or *CURLIB
must be specified along with CRTFILE(*YES).
FROMMBR The member of the From File to copy from. *FIRST is
the default.
TOMBR The member of the To File to copy to. *FIRST is the
default.
MBROPT Whether to replace or add records to the To File.
The default is *NONE which is valid when
CRTFILE(*YES) is specified. When CRTFILE(*NO) is
specified, The default of *NONE causes the general
CPYF escape message CPF2817.
*ADD should be specified to add records to the To
File.
*REPLACE should be specified to replace any existing
records in the To File.
CRTFILE Whether to create a new file or copy to an existing
To File. *NO is the default which means the To File
already exists.
*YES may be specified to create the To File. A
TOFILE library qualifier must be used (not *LIBL).
FROMRCD The first relative record number to start with in
the From File. The default is 1.
TORCD The ending relative record number to copy from. The
default is *END meaning the last record in the From
File.
Restrictions
------------
Not all of the CPYF parameters are supported.
Prerequisites
-------------
The following TAA Tools must be on your system:
EDTVAR Edit variable
RSNLSTMSG Resend last message
SNDCOMPMSG Send completion message
SNDDIAGMSG Send diagnostic message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CPYWTHDLT *CMD TAADBJJ QATTCMD
TAADBJJC *PGM CLP TAADBJJC QATTCL
|
Added to TAA Productivity tools September 15, 2000