CRTDUPPF CREATE DUPLICATE PHYSICAL FILE TAAOBJR
The Create Duplicate Physical File command duplicates a physical file
object. The intent of the command is to avoid two problems when
attempting to duplicate a model file:
** CRTDUPOBJ requires *OBJMGT authority which can be undesirable
to add to an object for general use.
** CPYF cannot be used to duplicate a file description unless a
member exists. Providing a member for a model file is awkward
because the user may accidentally add records to the member
and having a member wastes space.
CRTDUPPF allows you to have a model file which is only a physical
file object (no member) and to to create a file using the same format
and a member.
A typical command would be:
CRTDUPPF FROMFILE(ABC) TOLIB(DEF)
The existing file ABC does not need to have a member. A new file
would be created named ABC in library DEF. A member would be added
of the name ABC.
The user must have *USE authority to the file. Options exist to have
a different file name, a different member name and to specify the
text of the file and member.
CRTDUPPF operates by adopting the authority of QSECOFR to avoid the
requirement that the user have *OBJMGT authority to use CRTDUPOBJ.
CRTDUPPF checks the authority of the user to the existing file using
the TAA Tool UNADOPT to ensure the user has at least *USE authority
to the file.
Command parameters *CMD
FROMFILE The qualified file name of the physical file to
create a duplicate from. The library value defaults
to *LIBL. *CURLIB may also be specified.
TOLIB The library to duplicate the file to. *CURLIB may
NEWFILE The name of the new file to be created. *FROMFILE
is the default meaning the same name as specified in
the FROMFILE parameter.
TOMBR The name of the member in the TOFILE to be added if
it does not already exist. No error occurs if the
member already exists.
*NONE may be specified to create the file without
FILETEXT The text assigned to the new file. The default is
*FROMFILE meaning to use the text of the file named
in the FROMFILE parameter. No error occurs if the
member already exists.
MBRTEXT The text assigned to the new member if it is added.
The default is *FILETEXT meaning to use the text
specified in the FILETEXT parameter.
AUT The authority assigned to the new file. The default
is *USE. *CHANGE, *EXCLUDE, or *ALL may also be
The user must have *USE authority to the file.
The following TAA Tools must be on your system:
CHKOBJ2 Check object 2
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CRTDUPPF *CMD TAAOBJR QATTCMD
TAAOBJRC *PGM CLP TAAOBJRC QATTCL
Added to TAA Productivity tools May 1, 1996