ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Change user profile based off INLMNU/Menu

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

  • Change user profile based off INLMNU/Menu

    Hello, all!

    I am currently researching a way to add supplemental groups to user profiles based off what menu they have. E.g. all users with "main" menu will get the "maingrp" group added to their profile.

    I've tried playing with rtvusrprf command and putting it in a simple CL program, using the outfile from a dspusrprf *all cmd as the declare file. Mentally all still trying to plan it out.

    I'm not asking for anyone to write something up for me, but just looking for ideas. Is there a recommended command or function I should look into more? Many thanks for taking the time.

  • #2
    Hy Liquid_Fusion, if you are at least at 7.1 version you can try with an SQLRPGLE pgm, scan all your USRPRF with INLMNU equal something with QSYS2.USER_INFO service (https://www.ibm.com/developerworks/c...INFO%20catalog) and add your group with a CHGUSRPF command.

    Something like
    SELECT AUTHORIZATION_NAME FROM qsys2.user_info WHERE
    INITIAL_MENU_NAME ='MAIN'

    Comment


    • #3
      Not sure why you're bothering with the RTVUSRPRF command? Using the DSPUSRPRF *ALL command to an output file contains the initial menu so it's a simple matter of reading the file and updating the profiles based on your criteria.

      Comment

      Working...
      X