Hi Michael
The SQL I mentioned would need that OUTFILE, too - now it cannot be executed using RUNSQL or RUNSQLSTM, so could be done in ACS - as can the DSPOBJD, and even that, there is definitely a table function for getting object information, instead of using DSPOBJD. In fact, I bet that the SELECT could use the OBJECT_INFORMATION table function (sp?) as input for the whole thing.
This does require 7.3 or 7.4 with a certain level of the group PTF for database, I believe. I think Simon's article lists that, or it's available fairly easily on IBM's site.
Scripts that CAN do SELECT statements can be saved, either on a PC or in a PF or in a stream file and run from the ACS Run SQL Scripts tool - again, recommended by IBMers for system administration these days.
Regards
Vern
----- Original Message -----
From: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: "Mayer, Michael" <MMayer@xxxxxxxxxxxxxx>
Sent: Monday, January 31, 2022 12:17:23 PM
Subject: Mass CHGOBJOWN without DLTUSRPRF
Hello everyone. I'll take a beating for this answer. I haven't done this via SQL and sometimes objects get missed.
In my environment, I usually have many *STMF's in a user's IFS directory ('/dept/data/abc.stmf') etc plus *DIR
they own.
I'm sure there's an SQL method to handle ALL of a user's objects + subtree's where applicable and change them.
The CLLE mentioned is another option.
0001.00 PGM
0002.00
0003.00 DCLF FILE(SAOBJS)
0005.00 DSPOBJD OBJ(YOURLIB/*ALL) OBJTYPE(*ALL) +
0006.00 OUTPUT(*OUTFILE) OUTFILE(QTEMP/SAOBJS)
0008.00 READ: RCVF
0009.00 MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
0011.00 CHGOBJOWN OBJ(&ODLBNM/&ODOBNM) OBJTYPE(&ODOBTP) +
0012.00 NEWOWN(QDFTOWN)
0013.00 ENDPGM
Sometimes I CHGOWN manually using option 9 on the IFS objects. I'll usually construct a several page macro to handle it. I'll run it
As many times as it takes to change the STMF's (usually to the group profile of the associate leaving since all of my
associates are grouped.
Same goes for the directories they own and also make sure on the directories to include the subtree(*all) on the CHGOWN.
Yeah it's old school but it'll have to do until I construct an SQL to do it....
(smiling - cause I know I'll get feedback) ... lol.
😊
Very Respectfully,
Michael Mayer
IBM i on Power System Admin.
IT Operations.
The Florida Bar
651 E. Jefferson St
Tallahassee, Florida 32399-2300
mmayer@xxxxxxxxxxxxxx
https://www.floridabar.org
Office: 850.561.5761
Cell: 518.641.8906
2. Mass CHGOBJOWN without DLTUSRPRF? (Justin Taylor)
----------------------------------------------------------------------
message: 2
date: Mon, 31 Jan 2022 11:02:33 -0600
from: Justin Taylor <jtaylor.0ab@xxxxxxxxx>
subject: Mass CHGOBJOWN without DLTUSRPRF?
We had a long-time dev retire, and I'd like to change ownership on all the objects he owns. Typically when a user leaves we just have the DLTUSRPRF change ownership, but in this case we're not ready to delete the user.
Is there a way to do a mass owner change without deleting the profile?
TIA
------------------------------
________________________________
Please note: Florida has very broad public records laws. Many written communications to or from The Florida Bar regarding Bar business may be considered public records, which must be made available to anyone upon request. Your e-mail communications may therefore be subject to public disclosure.
As an Amazon Associate we earn from qualifying purchases.