IBM Z System Automation

Expand all | Collapse all

LISTUSER under SA/NetView

  • 1.  LISTUSER under SA/NetView

    Posted Thu July 22, 2021 03:35 PM
    How can I issue a TSO LISTUSER in REXX running under NETVIEW and store the results in a STEM variable?
    I've tried a couple of ways with no luck.
    Thanks.

    ------------------------------
    Martin Schexnayder
    ------------------------------


  • 2.  RE: LISTUSER under SA/NetView

    Posted Fri July 23, 2021 01:18 AM
    I use this in an NetView environment for RACF kinds of things:
     
                                      
    IRRC = IRRXUTIL("EXTRACT",,       
                    "USER",,          
                    USER_ID,,         
                    "OUTUSR1")        
                                      
    SEGM = OUTUSR1.NETVIEW.0 ¬= ''    
    NAME = OUTUSR1.BASE.NAME.1        
    GRPS = OUTUSR1.BASE.CGROUP.0      
                                      
     
    Here's a couple topics that may help:
     
    Also, take a look at the "LIST SAFOP=" NetView command:
     
    Steve Horein
    Infrastructure Engineer
    Deere & Company
    400 19th Street, Moline, IL 61265
     
    This transmission may contain Deere & Company information, data, or analysis that is proprietary, privileged, and/or confidential.  If you are not the intended recipient, any disclosure, copying, distribution, or use of the information contained herein is prohibited.
     
     

    Public
     





  • 3.  RE: LISTUSER under SA/NetView

    Posted Mon July 26, 2021 12:12 PM
    This is by far the best way to do it.  Unfortunately, my organization has the IRR.RADMIN.LISTUSER locked down.  I was hoping to do a WHEN(PROGRAM(DSIMNT)), but it looks like WHEN(PROGRAM is only allowed for Datasets and SERVAUTH.

    ------------------------------
    Martin Schexnayder
    ------------------------------



  • 4.  RE: LISTUSER under SA/NetView

    Posted Fri July 23, 2021 01:19 AM

    I use this in an NetView environment for RACF kinds of things:

                                        /*----------------------------*/

    IRRC = IRRXUTIL("EXTRACT",,        /* Use r_admin function       */

                    "USER",,           /* Focus is RACF members      */

                    USER_ID,,          /* Provide specific user ID   */

                    "OUTUSR1")         /* Store result in a stem     */

                                       /*----------------------------*/

    SEGM = OUTUSR1.NETVIEW.0 ¬= ''     /* NetView segment missing    */

    NAME = OUTUSR1.BASE.NAME.1         /* Get date connected         */

    GRPS = OUTUSR1.BASE.CGROUP.0       /* Get list of groups         */

                                       /*----------------------------*/

     

    Here's a couple topics that may help:

    https://www.ibm.com/docs/en/zos/2.4.0?topic=interfaces-irrxutil-rexx-interface-r-admin-extract

    https://www.ibm.com/docs/en/zos/2.4.0?topic=services-reference-documentation-tables

     

    Also, take a look at the "LIST SAFOP=" NetView command:

    https://www.ibm.com/docs/en/z-netview/6.3.0?topic=descriptions-list-nccf



    ------------------------------
    Steve Horein
    ------------------------------



  • 5.  RE: LISTUSER under SA/NetView

    Posted Fri July 23, 2021 02:53 AM

    Hi Martin,

    I think in order to use the TSO LU command, you have to configure the Netview TSO service. Not active here.

    But you can do:
    "PIPE MVS #LU USERID!CORRW 5!TAKE 1!SEP!STEM LU."
    DO I=1 TO 5
       SAY LU.I
    END
    where # is the RACF console identifier, which is set in the PARMLIB(IEFSSNxx) Member:

    SUBSYS SUBNAME(RACF)
    INITRTN(IRRSSI00)
    INITPARM('#')

    And you should probably suppress IRRA011I from the console output, otherwise you have the output in the SYSLOG/OPERLOG and have a appropriate MPF member, if the outout is needed some time.

    Best regards,
    Ralf



    ------------------------------
    Ralf Mahler
    ------------------------------



  • 6.  RE: LISTUSER under SA/NetView

    Posted Fri July 23, 2021 03:50 AM
    I used to use the PIPE TSO command:

    https://www.ibm.com/docs/en/z-netview/6.2.0?topic=syntax-pipe-tso

    However this requires that you set-up the TSO server (an actual server or a batch job). Worked quite well

    Sebastian

    ------------------------------
    Sebastian Welton
    welton.de
    Darmstadt
    ------------------------------