Authorities, user profiles, and file capabilities of the to-file

 

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 Copy From Query File (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:

 

Parent topic:

Creating the to-file (CRTFILE parameter)

 

Related concepts


Creating the to-file (CRTFILE parameter)