Using Adopted Authority
In some RPG shops, all programs are compiled with USRPRF(*OWNER)
and the owner of all programs is set to a specific user profile, which has the proper object authority to the database files. No other regular user profiles are granted authority to the files. In this scenario, the SQL service program will not have authority to any files and the query will fail. The solution to this is to change the service program so that it also uses adopted authority.Â
Changing the Service Program
This can be done with the following two commands where THE_OWNER is the user profile that has the correct authority to read the database files.
CHGSRVPGM SRVPGM(PROFOUNDUI/PUISQLPRC) USRPRF(*OWNER)
CHGOBJOWN OBJ(PROFOUNDUI/PUISQLPRC) OBJTYPE(*SRVPGM) NEWOWN(THE_OWNER)
Important - Profound UI Product Updates will Fail
It is important to note that after the above commands have been run, any Profound UI product update will fail because the installer will not have authority to replace the PUISQLPRC object. You should delete or rename the PUISQLPRC service program before running the installer.
After updating the product, you will need to re-run the two commands.