CPYNONGEN COPY NON GENERIC TAADBMM |
The Copy Non Generic command copies records from one file/member to
another and bypasses the records containing a list of generic values
for a named field. This allows 'all but generic xxx' to be copied.
Most queries do not support a selection by '*NE a generic value'.
Using CPYNONGEN allows a subset file to be created which can then be
queried.
You must have *ALL authority to the To file if it exists.
A typical command would be:
CPYNONGEN FROMFILE(xxx) TOFILE(yyy)
FLDNAM(NAME) EXCVAL(ABC DEF)
All records would be copied except those that begin with ABC or DEV
in the NAME field.
The record length of the From file cannot exceed 9999 bytes. The
formats of the two files must be the same. The length of the EXCVAL
values must be less than the field length.
Both the EXCVAL values and the data are translated to upper case
before making a comparison.
CPYNONGEN escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent.
CPYNONGEN Command parameters *CMD
----------------------------
FROMFILE The qualified name of the file to copy from. The
library value defaults to *LIBL. A specific library
or *CURLIB may also be used.
TOFILE The qualified name of the file to copy to. The
library value defaults to *LIBL. A specific library
or *CURLIB may also be used. *LIBL is not valid if
CRTFILE(*YES) is specified.
FLDNAM The field name to be checked for a generic value.
It must be a character field.
EXCVAL A list of up to 100 generic values to be excluded.
No * should appear. The length of the each value
must be less than or equal to the length of the
field specified. A maximum of 10 characters may be
entered for each value.
Both the EXCVAL values and the data are translated
to upper case before making a comparison.
If a character field in the data base has all
digits, a generic request may still be made, but the
value must be entered in quotes such as '1234'.
FROMMBR The member to copy from. *FIRST is the default. A
specific member or *LAST may be specified.
TOMBR The member to copy to. *FIRST is the default. A
specific member or *LAST may be specified.
MBROPT The member option.
*NONE is the default and may only be used when
CRTFILE(*YES) is specified.
*ADD may be specified to add records to an existing
member. Note that if the command is used multiple
times using the same from/to members without
replacing the data, it is probable that duplicate
records will exist.
*REPLACE may be specified to clear the To member
before writing records to it.
CRTFILE A *YES/*NO option for whether to create the file.
*NO is the default meaning the file already exists.
*YES may be specified to create the file.
Restrictions
------------
*ALL authority to the To file is required if it exists.
The record length of the From file cannot exceed 9999 bytes.
The formats of the two files must be the same.
The length of the EXCVAL must be less than the field length.
Only data files are supported.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKDBFMBR Check data base file member
EDTVAR Edit variable
EXTLST Extract list
RSNLSTMSG Resend last message
RTVDBFA Retrieve data base file attributes
RTVFLDA Retrieve field attributes
RTVVALA Retrieve value attributes
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
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
------ ---- --------- ---------- ----------
CPYNONGEN *CMD TAADBMM QATTCMD
TAADBMMC *PGM CLP TAADBMMC QATTCL
TAADBMMR *PGM RPG TAADBMMR QATTRPG
|
Added to TAA Productivity tools January 15, 2010