Authority when deploying physical files on IBM i using RTC EE
Hello,
I have two questions concerning object authority when deploying physical files on IBM i.
1. When we re-deploy program objects, it replaces the existing object, so the authority set on the object is maintained. But in case of physical files, it renames the existing file, creates a new file via deployment and copies back the data to the new file. Because the original file is deleted, the authority is also refreshed.
Is there a way to keep the authority on physical files, so that we do not have to reassign authorities on each files?
2. We are creating physical files via SQL using RUNSQLSTM command, and grants authority within SQL statement. So when we do the build, object is created with given authority but when we package and deploy the object, it is restored without the authority set. For example, can we use SAVOBJ command with PVTAUT(*YES) when packaging and use RSTOBJ command with PVTAUT(*YES) when deploying? Or should we create a program the sets object authority after deploying?
I am testing with RTC V5.0 with IBM i 7.1.
Thanks.
I have two questions concerning object authority when deploying physical files on IBM i.
1. When we re-deploy program objects, it replaces the existing object, so the authority set on the object is maintained. But in case of physical files, it renames the existing file, creates a new file via deployment and copies back the data to the new file. Because the original file is deleted, the authority is also refreshed.
Is there a way to keep the authority on physical files, so that we do not have to reassign authorities on each files?
2. We are creating physical files via SQL using RUNSQLSTM command, and grants authority within SQL statement. So when we do the build, object is created with given authority but when we package and deploy the object, it is restored without the authority set. For example, can we use SAVOBJ command with PVTAUT(*YES) when packaging and use RSTOBJ command with PVTAUT(*YES) when deploying? Or should we create a program the sets object authority after deploying?
I am testing with RTC V5.0 with IBM i 7.1.
Thanks.
Accepted answer
Hi Naho,
Unfortunately there's no way to keep the authority on physical files currently. Please submit an enhancement request to have this function added.
The enhancement will cover item #2 as well. Yes, you would need to create a program that sets the object authority after the deployment as a workaround for now.
Here's the link to submit the request:
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.newWorkItem&type=enhancement&ts=14205546437980
Thanks...Alex
Unfortunately there's no way to keep the authority on physical files currently. Please submit an enhancement request to have this function added.
The enhancement will cover item #2 as well. Yes, you would need to create a program that sets the object authority after the deployment as a workaround for now.
Here's the link to submit the request:
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.newWorkItem&type=enhancement&ts=14205546437980
Thanks...Alex
One other answer
Hi Naho! I just wanted to supplement Alex's answer.
With restoring PF's there are 3 options (infocenter link: http://www-01.ibm.com/support/knowledgecenter/SSYMRC_5.0.2/com.ibm.team.build.doc/topics/t_deploy_ibmideployprops.html?lang=en ) :
1) Overwrite physical files with packaged objects - this treats PFs like any other objects, i.e. they're restored directly from the package's savefiles. However, it's replacing PFs without migrating data contents from existing PFs on the system.
2) Copy existing data - it sounds like this is the option you're using. This backs up the PFs, restores the packaged PFs as new files and then migrates data from the pre-existing PF to the newly-deployed PF.
3) User-defined command to deploy each physical file: this gives you control to deploy each PF however you want. The command/program you specify here will be invoked iteratively, once for each PF in the package, and then a final "cleanup" call to this program after restoring all LFs in the package. With this method, your user-defined program could set each PF's authority however you want.
To summarize, as Alex said, we don't handle this automatically, and this is a worthy enhancement. However, you may be able to get to what you need with the user-defined command.
~Sean~