DUPFILFMT2 DUPLICATE FILE FORMAT 2 TAADBOH |
The Duplicate File Format 2 command duplicates a file from a physical
file to a new file with the same format as the original file. No
data is copied to the new file. The user must have *USE rights to
the file being duplicated. This differs from CRTDUPOBJ which
requires *OBJMGT authority.
DUPFILFMT is a similar command which creates the new file by
accessing the source and using CRTPF. DUPFILFMT2 uses CRTDUPOBJ in a
sub program that adopts the QSECOFR profile.
A typical command would be:
DUPFILFMT2 FILE(ABC) TOLIB(XYZ)
The file ABC must be a physical file and must must not exist in
library XYZ. The ABC file would be created in library XYZ with the
same format. See the MBR parameter for the handling of members in
the new file.
DUPFILFMT2 escape messages you can monitor for
----------------------------------------------
TAA9891 The file must be a physical file
TAA9892 The file to be created already exists
Escape messages from based on functions will be re-sent.
DUPFILFMT2 Command parameters *CMD
-----------------------------
FILE The qualified name of the file to be duplicated.
The library value defaults to *LIBL. A specific
library or *CURLIB may also be used.
TOLIB The library where the file will be duplicated to.
It may be the same library as per the FILE parameter
if a new file name is used.
NEWFIL The name of the new file. The default is *FILE
meaning the same file name as in the FILE parameter.
MBR The member name in the file to be created. The
default is *FILE meaning the member name is taken
from the new file being created.
If the file being duplicated has no members, the new
file will not have any members.
TEXT The text description for the new file.
*DFT is the default meaning the text will be
'Created by DUPFILFMT2 from lll/fff'. A specific
text description may be entered. The text
description will also be used for the member text
description.
Restrictions
------------
** Only a physical file may be duplicated.
** The user must have *USE rights to the file being duplicated.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKOBJ3 Check object 3
RMVMSGKEY Remove message key
RSNLSTMSG Resend last message
RTVDBFA Retrieve data base file attributes
SNDCOMPMSG Send completion message
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
------ ---- --------- ---------- ----------
DUPFILFMT2 *CMD TAADBOH QATTCMD
TAADBOHC *PGM CLP TAADBOHC QATTCL
TAADBOHC2 *PGM CLP TAADBOHC2 QATTCL
The TAADBOHC2 program is created as USRPRF(*OWNER).
|
Added to TAA Productivity tools October 15, 2013