Re: GRTOBJAUT...does anyone know
Vern Hamberg via MIDRANGE-L <[email protected]>
| Newsgroups | gmane.comp.hardware.ibm.midrange |
|---|---|
| Message-ID | <[email protected]> |
I think you are better off getting a list of those that need the change.
I suggest using SQL - first use one of the security services that can
filter by authorities in a CTE - common table expression. Use columns
from the CTE in a SELECT that uses the QCMDEXC function to execute the
GRTOBJAUT command. Here is a simple example that you might be able to
modify - you would probably use :
WITH FF AS (SELECT TRIM(TABLE_SCHEMA) || '/' || TRIM(TABLE_PARTITION)
PGMNAME,
TRIM(TABLE_SCHEMA) || '/' || TRIM(TABLE_NAME) SRCNAME
FROM SYSPARTITIONSTAT
WHERE TABLE_SCHEMA = 'VHAMBERG' AND TABLE_NAME = 'GOODBADSRC')
SELECT SRCNAME,
PGMNAME,
CASE
WHEN QSYS2.QCMDEXC('CRTBNDCL PGM(' || PGMNAME || ')
SRCFILE(' || SRCNAME || ')') = 1
THEN 'Compile succeeded'
ELSE 'Compile failed' END AS COMPILE_RESULT
FROM FF;
*Regards*
*Vern Hamberg*
IBM Champion 2025 <cid:[email protected]> CAAC
(COMMON Americas Advisory Council) IBM Influencer 2023
On 5/11/2026 8:12 AM, [email protected] wrote:
> We are in the process of cleaning up / tightening up security on our
> production machines.
>
>
>
> One of the many libraries has about 8,000 objects in it and all but about
> 100 have the correct authorities. If I do a GRTOBJAUT for *ALL objects in
> the library, does anyone know if the command is smart enough to only look at
> and only adjust the objects that do not have the particular supplemental
> group or does it try to adjust all 8,000? I'm trying to figure out if it
> would be more efficient to build a CL with just the objects that are
> problems.
>
>
>
> And please do not suggest using authorization lists. I'm working toward
> that but trying to get a handle on why the authorities are what they are
> (and that would politely be called "a mess") has been like trying to turn a
> barge with an oar. I'm slowing getting there but is it taking forever so we
> are taking an intermediate step first.
>
>
>
>
>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact [email protected] for any subscription related questions.