In some RPG shops, all programs are compiled with USRPRF(*OWNER) and the owner of all programs is set one specific user profile which has the correct 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 is the change the service program so it also uses adopted authority. This can be done with the following two commands
CHGSRVPGM SRVPGM(PROFOUNDUI/PUISQLPRC) USRPRF(*OWNER)
CHGOBJOWN OBJ(PROFOUNDUI/PUISQLPRC) OBJTYPE(*SRVPGM) NEWOWN(THE_OWNER)
where THE_OWNER is the user profile that has the correct authority to read the database files
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 the product has been updated, you will need to re-run the two commands above.