Actually, if you create a UDF for QCMDEXC it gets quite easy.
Then it's a simple matter of (somethine like)
Select object, library, userprofile, QCMDEXC('CHGOBJOWN OBJ(' +
trim(library) + '/' + trim(object) + ') OBJTYPE(' + objtype + ')
Where library='MYLIB' and userprofile='FIREDDUDE'
ORDER BY 1
The order by helps to ensure that it executes all the way through the
As you can see, we use this QCMDEXC UDF quite often.
An alternative might be studying qsHell to see if there's some strange
command that has to offer.