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:part1.H291BU20.6TspYA3O@centurylink.net> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023


On 5/11/2026 8:12 AM, smith5646midrange@xxxxxxxxx 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.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.