When the Copy File (CPYF) command creates the local physical file,
the from-file gives the created to-file all the authorities of
the from-file. These authorities include public, private, and authorization
lists.
When CPYFRMQRYF creates the local physical file, the authorities
given are of the first file that is specified on the FILE parameter of the
corresponding Open
Query File (OPNQRYF) command. The authorities include public, private,
and authorization lists.
In both cases, the owner of the created to-file is the user profile running
the copy command. The user running the copy command inherits *ALL authority
to the object. This is true unless the user is a member of a group profile
and has OWNER(*GRPPRF) specified for the profile.
If you specify OWNER(*GRPPRF), the group profile becomes the owner of the
to-file. In this case, if the user profile running the copy command does not
have authority to add a member or write data to the new file, the copy command
fails.
The created to-file does not maintain the file capabilities of the from-file.
The to-file allows update, delete, read, and write operations, regardless
of whether the from-file allowed these operations. Following are special considerations
for the new to-file:
- If the number of records copied into a member is greater than the maximum
size of the created to-file, the to-file is extended without intervention
by the system operator.
- If the from-file is an SQL table, view, or index, the created to-file
will be a physical file that is not an SQL table. However, when the from-file
contains LOBs, datalinks, or user-defined types, the created to-file is an
SQL table.
- If the from-file is an SQL table, the default values are not preserved.
The default data type value will apply to the created physical file.
- If the from-file has a trigger program associated with it, the CPYF and CPYFRMQRYF commands do not copy the trigger information
to the to-file when the CRTFILE parameter is used.
- If you create a new file (CRTFILE(*YES)) from a file with constraints,
the constraint definitions do not copy to the new file.
- If you create a new file (CRTFILE(*YES)) from a file with user-defined
functions, the user-defined functions do not copy to the new file.