ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

object authorities report

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • object authorities report

    I have written a report program that lists all users on the system, about 70,000 of them, and they asked me to include object authorities. Ok, no problem, but the way I did it was to execute DSPOBJAUT to an outfile and then read that outfile. It is taking WAY to long. So I tried to find either an API or system file that would give me that information but I am unable to find anything. Does anyone know of a better way?

  • #2
    I'm pretty sure that there is something in the new SQL functions that will give you this. Check out Simon's blog at https://www.rpgpgm.com/ he has done a LOT on these capabilities and I'm pretty sure he talked to just this requirement not that long ago.

    Comment


    • #3
      Thank you Jon Boy. That may give me what I am looking for. Certainly good to know. I am investigating now, but I am not sure it includes object authority to user profiles. My command to an outfile looks like this - DSPOBJAUT OBJ(QSYS/myprofile) OBJTYPE(*USRPRF) OUTPUT(*OUTFILE) OUTFILE(QTEMP/QDSPOBJAUT). Then my program reads file QTEMP/QDSPOBJAUT to get the users that are authorized to the user profile in question. Then go to the next profile and so on 70,000 times. I am replacing QTEMP/QDSPOBJAUT each time which maybe I should not do, but before I make that change I was hoping there was a system table like the SYSTABAUTH that Simon describes.

      Comment


      • #4
        OOPS, Sorry. I mentioned the wrong system file in my reply. I am looking at QSYS2.OBJECT_PRIVILEGES....

        Comment


        • #5
          Actually, this is PERFECT - https://www.rpgpgm.com/2017/05/viewi...view.html#more - THANK YOU!

          Comment


          • #6
            Yup - that's the one I was thinking of.

            Comment


            • #7
              I think what you are looking at is the output from the PRTPVTAUT command - PRTPVTAUT OBJTYPE(*USRPRF).
              The command also generates a file with the object authorities.

              Comment

              Working...
              X