IBM Security Z Security

Security for Z

Join this online user group to communicate across Z Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Including CSDATA information when there's not always CS segment

  • 1.  Including CSDATA information when there's not always CS segment

    Posted 05/12/21 10:44 AM

    For users connected to a particular group I want to list name uid and a field from CSDATA which may or may not exist. I currently have this code

    newlist type=RACF name=SELGRP outlim=0

    select c=USER CGGRPNM=#PCQM s=BASE

    sortlist key(8)

    newlist type=RACF proflist=SELGRP

    select class=USER segment=CSDATA

    sortlist key(8) :dfltgrp :name :uid longname

    The problem I have is that not all the userids in the group have any CSDATA, only the ones with CSDATA segments are being selected which makes sense.

    How do I include CSDATA(LONGNAME) if a userid has it?

    Regards

    Carolyn


    #ZSecurity
    #Support
    #SupportMigration


  • 2.  RE: Including CSDATA information when there's not always CS segment

    Posted 05/12/21 11:46 AM

    You can use SUMMARY to pull together different segments of a user ID, with the MAX modifier selecting the non-blank value of the different segments. So you could create a combined TSO, OMVS and BASE report with:

    n type=racf

    s c=user segment=base or segment=tso or segment=omvs

    sum profile(8) dfltgrp(max) uid(max) tmsize(max) count(nd)

    Unfortunately, fields from CSDATA segments do not support the (MAX) statistic, so we have to use DEFINE to pull it in explicitly. Also, we only want to print this LONGNAME field when there is a matching BASE segment (with the connect group names):

    n type=racf

    define LONGNAME(csvalue) subselect custom_data(cskey=LONGNAME)

    s c=user (segment=csdata or cggrpnm=#PCQM)

    define basesegfnd count where cggrpnm=*

    sum profile(8) dfltgrp(max) :uid(max) LONGNAME(max,0) basesegfnd(>0,nd)


    #Support
    #ZSecurity
    #SupportMigration


  • 3.  RE: Including CSDATA information when there's not always CS segment

    Posted 05/12/21 12:18 PM

    thanks Rob, just what I needed


    #Support
    #SupportMigration
    #ZSecurity