We have a situation where we have a USER that will no longer be signing onto the system. This often happens when Employees leave the company.
This User Profile owns all of the objects that they created on the system over the many years. So there are thousands of them in at least a dozen different libraries.
I'm wondering how shops handle this kind of thing; when I user leaves and their user profile owns objects? My solution was to write a RNMOBJOWN (Rename Object Owner) CL command that changes the owner of every object owned by User X to User Y.
SOLUTION: There is a DLTUSRPRF parameter that allows a mass-change of ownership. Specify the "Owner's Objects Option" and you can change the owner while deleting. Here's something I've been using but forgot about:
DLTUSRPRF USRPRF(&OLDOWN) OWNOBJOPT(*CHGOWN &NEWOWN)
The only thing about this choice, is that it requires that you are deleting the old profile. I suppose that's fine, but in our case, they've embedded it into things like FTP scripts with customers/vendors so we can't really delete it as yet.
I also couldn't believe that after 30 years CHGOBJOWN is still NOT generic; thankfully the IFS-related CHGOWN command does support generic names and I've used it for a long time instead of CHGOBJOWN, but I used CHGOBJOWN under the covers for RNMOBJOWN.