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

CARLa for Reporting on OMVS Segments

  • 1.  CARLa for Reporting on OMVS Segments

    Posted Mon December 09, 2024 07:08 PM

    Hello zSecure Community!

    I have been asked to produce a report to discover all the OMVS HDir values (/u/home/userid) where the userid (lowercase or uppercase) is compared to the UserID and see the list of ones that DO NOT match.  A second 'task' was to generate the same list but have 'uppercase' values in the HDir home directory value (/u/home/USERID).  "Ours (mine) is not to reason why, ours (mine) is but to do and ..."  

    Using the zSecure panels,  I was able to fashion a program as:

    --------------------------------------------------------------------------

    define masklist as profile                                        
    n required segment=OMVS n=selsegm outlim=0                        
      s c=user  segment=OMVS                                          
                                                                       
    n n=OMVSRQ1 segment=BASE required allowrestrict proflist=selsegm, 
     ,                                                                
     
     tt="zSecure Suite USER OMVS Setment HDir UserID overview",       
     st='Users HDir=/u/home/ '                                        
     s s=base c=user                                                  
     sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),       
     ,                                                                
       key(8,"User",key,pas) key:pgmrname,                            
       key:uid(10,num,"       Uid") key:home(20,"HomeDir")   

    -------------------------------------------------------------------------- 

           

    ... and this produced a report as:

    --------------------------------------------------------------------------

    zSecure Suite USER OMVS Setment HDir UserID overview - complex TPX       9Dec2024 02:00   page    1  
     
    Users HDir=/u/home/                                                                                                                   
     
    User          Name                                             Uid   HomeDir                                                                                      
    #CIA0A   CICS SCHEDULER ID       1002235  /u/home/#cia0a                                                                               
    #CIA0B   CICS SCHEDULER ID       1002236  /u/home/#cia0b                                                                               
    #CIA0C   CICS SCHEDULER ID                           /u/home/#cia0c                                                                               
    #CIA0D   CICS SCHEDULER ID                           /u/home/#cia0d   
    .
    .
    .
    How could I modify the CARLa to look for and compare lowercase values to uppercase values?  How could I parse to the Userid value in the HDir value returned by CARLa (/u/home/userid).  I'm curious if there is a way - I've looked thru the 'CARLa Command Reference' for 'offset' use but it doesn't apply here I think. 
    Many, many thanks for hosting this forum.  Really appreciate you guys.
    Lynn Gilson


    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------


  • 2.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 11:43 AM

    Hi Lynn.

    Normally, you can use the == operator to compare the contents of one field with another.  You can also use DEFINE to collect a substring or other token from a string.  So if the uppercase/lowercase issue didn't apply, you would write your report like so:

    newlist name=OMVSRQ1,
     tt="zSecure Suite USER OMVS Setment HDir UserID overview",       
     st="Users HDir=/u/home/ does not match user ID"
     define masklist as profile
     define subdir as word(home,3,"/") where home=:"/u/home/" and missing(word(home,4,"/"))
     s c=user s=omvs subdir<<>>masklist
     sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),       
       key(8,"User",key,pas) key:pgmrname,                            
       uid(10,num,"       Uid") home(20,"HomeDir")   

    However, the profile key (user ID) is in upper case and the 3rd word in the directory is lower case,  and CARLa's == and <<>> operators compare field contents with field contents, without accepting different case values  (I believe).

    Luckily, when you compare a field value with a text (literal) value, the SELECT command first converts both values to upper case.  So your report can be constructed as a two pass query, like so:

    n type=racf name=OMVSGEN nopage dd=ckr2pass 
     define once(nd) boolean where true
     define each(nd) count

     s c=user s=omvs exists(home)

     summary once,
      'newlist name=OMVSRQ1,',
    / '  tt="zSecure Suite USER OMVS Setment HDir UserID overview",',
    / '  st="Users HDir=/u/home/ does not match user ID"',
    / ' define subdir as word(home,3,"/") where home=:"/u/home/" and missing(word(home,4,"/"))',
    / ' select c=user s=omvs'

    summary each,
    '  exclude key=' | key(0) 'and subdir=' | key

    summary once,
      ' sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),',
    / '  key(8,"User",key,pas) key:pgmrname,',
    / '  uid(10,num,"       Uid") home(20,"HomeDir")'

    This code generates a CARLa program that selects the OMVS segment of all users, and excludes the ones where the user ID value is found in the 3rd node of the home field.  Once this CARLa program is shown, you can issue the RUN command in the command line to produce the report.

    Note: I have typed this from memory and not tried it.  There are probably quotes of commas missing.  Better some idea than no solution, right?



    ------------------------------
    Rob van Hoboken
    ------------------------------



  • 3.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 01:11 PM

    Hello Rob, 

    Thanks very much for taking a look at this.  I'm still working it but here are my results so far:

    First run:
    CKR0128 12 Expecting relational operator or "(" instead of end of line at CKRCMDV line 2       
    CKR0987 12 Syntax error: text expected instead of end of line at CKRCMDV line 2                
    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1 
    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1 
    CKR0000 12 CKRCARLA terminated due to input errors                                             
     
    Note: I altered "define once(nd) boolean where true" to "define once(nd) boolean where type=true" and it passed syntax check. I'm unsure if this is was intended by you. 
     
     
    Second run:
    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1  
    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1  
    CKR0000 12 CKRCARLA terminated due to input errors                                              
     
    Note: these are produced at the lines 'each' and 'once' seen below:
    Include CKRCMDV  (ISPF variable)                                                               
         1 |n type=racf name=OMVSGEN nopage dd=ckr2pass                                            
         2 | define once(nd) boolean where type=true                                               
         3 | define each(nd) count                                                                 
         5 | s c=user s=omvs exists(home)                                                          
         7 | summary once,                                                                         
         8 |  'newlist name=OMVSRQ1,',                                                             
         9 |/ '  tt="zSecure Suite USER OMVS Segment HDir UserID overview",',                      
        10 |/ '  st="Users HDir=/u/home/ does not match user ID"',                                 
        11 |/ ' define subdir as word(home,3,"/") where home=:"/u/home/" and                       
        12+|           missing(word(home,4,"/"))',                                                 
        13 |/ ' select c=user s=omvs'                                                              
        15 | summary each,                                                                         
    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1 
        16 |  '  exclude key=' | key(0) ' and subdir=' | key                                       
        18 | summary once,                                                                         
    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1 
        19 |  ' sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),',                       
        20 |/ '  key(8,"User",key,pas) key:pgmrname,',                                             
        21 |/ '  uid(10,num,"       Uid") home(20,"HomeDir")'                                      
    End of  CKRCMDV  (include level 1) 
     
     
    I tried some variations and double/triple checked the code I pasted in but am now puzzled how to get this to work.
    I'll keep analyzing.  Maybe you have an idea?  
    Thanks very much,
    Lynn Gilson



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 4.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 02:12 PM
    Edited by Rob van Hoboken Tue December 10, 2024 02:14 PM

    OK, so there was a fix removed from CKRCARLA after I left IBM.  I fixed the issue related to

    CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1 

    but that fix is no longer there.  To get the code I gave you going, you have to remove the parameter NAME=OMVSGEN from the first line, so:

    n type=racf nopage dd=ckr2pass

    Next:

     define once(nd) boolean where true
    CKR0128 12 Expecting relational operator or "(" instead of end of line at CKRCMDV line 2       
    CKR0987 12 Syntax error: text expected instead of end of line at CKRCMDV line 2                

    Can you try if this error still occurs after you removed the NAME parameter?  If it is still there, to change line 2 into 

    define once(nd) boolean where complex==complex



    ------------------------------
    Rob van Hoboken
    ------------------------------



  • 5.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 05:21 PM

    Hi Rob,

    > OK, so there was a fix removed from CKRCARLA after I left IBM.  I fixed the issue related to
    > CKR0391 12 Duplicate NEWLIST NAME=OMVSGEN at CKRCMDV line 1, already defined at CKRCMDV line 1 
    > but that fix is no longer there. 

    You put in a fix so that the syntax error was no longer issued, but it turned out that later processing could not cope with the situations, so issuing the syntax error was in fact the right thing to do.
    I believe the revert happened in the same release being developed, 2.5.0, and am unsure if there was ever a release out in the field that did not issue the CKR0391.

    FWIW,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development Manager IBM Security zSecure
    Delft
    ------------------------------



  • 6.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 05:30 PM

    Yes, success after removing the NAME=OMVSGEN parameter.  No error.  Moving on to my 'exclude' processing in the 'gen'd code now.  Many thanks for your help!  



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 7.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 05:58 PM

    Hello Rob,

    Received your suggestions.  I modified the code to the following:

    n type=racf nopage dd=ckr2pass                                        
     define once(nd) boolean where key=true                               
     define each(nd) count                                                
     define subdir(char) as word(home,3,"/") where home=:"/u/home/" and   
            missing(word(home,4,"/"))                                     
     s c=user s=omvs exists(home)                                         
     summary once,                                                        
      'newlist name=OMVSRQ1,',                                            
    / '  tt="zSecure Suite USER OMVS Segment HDir UserID overview",',     
    / '  st="Users HDir=/u/home/ does not match user ID"',                
    / ' define subdir as word(home,3,"/") where home=:"/u/home/" and      
               missing(word(home,4,"/"))',                                
    / ' select c=user s=omvs'                                             
     summary each,                                                        
      '  exclude key=' | key(0) 'and subdir=' | key                       
     summary once,                                                        
      ' sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),',      
    / '  key(8,"User",key,pas) key:pgmrname,',                            
    / '  uid(10,num,"       Uid") home(20,"HomeDir") subdir(20,"SubDir")'

    This generated CKR2PASS code as:

    newlist name=OMVSRQ1,                                             
      tt="zSecure Suite USER OMVS Segment HDir UserID overview",      
      st="Users HDir=/u/home/ does not match user ID"                 
     define subdir as word(home,3,"/") where home=:"/u/home/" and     
            missing(word(home,4,"/"))                                 
     select c=user s=omvs                                             
      exclude key=#CIA0A and subdir=#CIA0A                            
      exclude key=#CIA0B and subdir=#CIA0B                            
      exclude key=#CIA0C and subdir=#CIA0C                            
      exclude key=#CIA0D and subdir=#CIA0D                            
      exclude key=#CIA0E and subdir=#CIA0E                            
      exclude key=#CIA0F and subdir=#CIA0F                            
      exclude key=#CIA0G and subdir=#CIA0G                            
      exclude key=#CIA0H and subdir=#CIA0H                            
      exclude key=#CIA0I and subdir=#CIA0I                            
      exclude key=#CIA0J and subdir=#CIA0J                            
      exclude key=#CIA00 and subdir=#CIA00                            
     sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),       
      key(8,"User",key,pas) key:pgmrname,                             
      uid(10,num,"       Uid") home(20,"HomeDir") subdir(20,"SubDir")

    I removed several hundred lines just to shorten it up and test it leaving only those 11 'exclude' statements.  This produced a report as:

    zSecure Suite USER OMVS Segment HDir UserID overview - complex TPX      10Dec2024 02:00  
    Users HDir=/u/home/ does not match user ID                                               
                                                                                             
    User     Name                        Uid HomeDir              SubDir                     
    #CIA0A   CICS SCHEDULER ID       1002235 /u/home/#cia0a                                  
    #CIA0B   CICS SCHEDULER ID       1002236 /u/home/#cia0b                                  
    #CIA0C   CICS SCHEDULER ID               /u/home/#cia0c                                  
    #CIA0D   CICS SCHEDULER ID               /u/home/#cia0d                                  
    #CIA0E   CICS SCHEDULER ID       1003082 /u/home/#cia0e                                  
    #CIA0F   CICS SCHEDULER ID       1003083 /u/home/#cia0f                                  
    #CIA0G   CICS SCHEDULER ID       1003084 /u/home/#cia0g                                  
    #CIA0H   CICS SCHEDULER ID       1003085 /u/home/#cia0h                                  
    #CIA0I   CICS SCHEDULER ID       1003086 /u/home/#cia0i                                  
    #CIA0J   CICS SCHEDULER ID       1003087 /u/home/#cia0j                                  
    #CIA00   CICS SCHEDULER ID       1001923 /u/home/#cia00                                  
    #CIA00QF CICS SCHEDULER ID       1003518 /u/home/#cia00qf                                
    #CIA00QV CICS SCHEDULER ID       1003517 /u/home/#cia00qv                                
    #CIA00TF CICS SCHEDULER ID       1003537 /u/home/#cia00tf                                
    #CIA00W  CICS SCHEDULER ID       1001924 /u/home/#cia00w                                 
    #CIA00WF CICS SCHEDULER ID       1003538 /u/home/#cia00wf  

    .

    .

    .

    several hundred entries.   

    I hope this help with the 'exclude'.  That 'SubDir' I included comes up blank.  

    Many thanks!

    Lynn



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 8.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 06:48 PM

    Hello Rob!

    Just wanted to summarize again (for my own clarity, sanity) using the 2-pass code you helped me with Rob works.  The generated code properly generates all the 'exclude' statements where we found the RACF ID 'UserID' matches the '/u/home/userid' and is not case-sensitive. For example:

     User         Name                                              Uid  HomeDir                  SubDir                     
    #CIA0A   CICS SCHEDULER ID       1002235  /u/home/#cia0a             

    RACF ID User "#CIA0A" is correct in our scheme for the proper name for the HomeDir "/u/home/#cia0a" so the code generates an 'exclude' statement as:

    exclude key=#CIA0A and subdir=#CIA0A

    However, once the 2-Pass code generated is submitted and run it does NOT 'exclude' those in the report.   I think that's what I'm aiming for with this report, trying to find all 'HomeDir' values that don't represent the RACF ID, and also to find any 'uppercase' values in the 'HomeDir'.   

    Many thanks Rob for reading thru my ramblings.  

    Lynn



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 9.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 06:57 PM

    Rob,

    Last minute update...  I removed the parameter 'and subdir=#CIA0A'  and the generated 'exclude' statements were in fact excluded.  I guess either the 'subdir=' value is not right or does not contain data, or the 'and' statement does not work on the 'exclude' statement?  I simply removed the 'and subdir=#CIA0A' from a group of statements and they were successfully excluded from the report.  You probably already knew that (asking for 'SubDir' to print out (see code and output I pasted herein). 

    Having the 'and subdir=' in the exclude statement gives me more clarity though that these records are the ones we want to keep, only trying to find the odd ones out. 

    select c=user s=omvs                                             
      exclude key=#CIA0A 



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 10.  RE: CARLa for Reporting on OMVS Segments

    Posted Tue December 10, 2024 07:31 PM

    Hello Rob,

    I think the problem was in the 'exclude'.  I altered it to this syntax:

    summary each,                                                       

      '  exclude ( key=' | key(0) ' and home=' | home(0) ')'             

    and with this formatted exclude statement generated by the 2-pass code:

    select c=user s=omvs

     exclude ( key=#CIA0A    and home=/u/home/#cia0a ) 

    It worked.  the 'and' needed to be in parentheses.  

    I'll continue to work this to see if it's what these users want.  

    Many thanks for your 'bounce back' on my ramblings. 

    Lynn



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 11.  RE: CARLa for Reporting on OMVS Segments

    Posted Wed December 11, 2024 05:24 AM
    Edited by Rob van Hoboken Wed December 11, 2024 03:48 PM

    Hi Lynn

    I'm entering my reply a second time, the first reply was held up because I wrote a syntax summary word(home,zzz,'/') except I used x instead of z.  Guess what, 3 time x is a prohibited word in the forum.

    Anyway, when I used word(home,3,'/') in the code, I had overlooked the way that word deals with the first / in the directory.  I should have used word(home,4,'/') to catch the 3rd node of the directory!  The code to generate your report should look like:

    n type=racf nopage dd=ckr2pass
    define once(nd) boolean where complex==complex /* always a TRUE or a FALSE value */
     define each(nd) count
     s c=user s=omvs exists(home)

     summary once,
      'newlist name=OMVSRQ1,',
    / '  tt="zSecure Suite USER OMVS Segment HDir UserID overview",',
    / '  st="Users HDir=/u/home/ does not match user ID"',
    / ' define subdir as word(home,4,"/") where home=:"/u/home/" and 
               missing(word(home,5,"/"))',
    / ' select c=user s=omvs'

     summary each,
    '  exclude key=' | key(0) 'subdir=' | key(0)

     summary once,
      ' sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),',
    / '  key(8,"User",key,pas) key:pgmrname,',
    / '  uid(10,num,"       Uid") home(20,"HomeDir") subdir(20,"SubDir")'

    ------------------------------
    Rob van Hoboken
    ------------------------------



  • 12.  RE: CARLa for Reporting on OMVS Segments

    Posted Wed December 11, 2024 02:40 PM

    Hello Rob and zSecure Forum!

    This CARLa program works wonderfully.  The 1st Pass of the code (in above) produced the desired 2nd Pass generated code as:

    newlist name=OMVSRQ1,                                                                  
      tt="zSecure Suite USER OMVS Segment HDir UserID overview",                           
      st="Users HDir=/u/home/ does not match user ID"                                      
     define subdir as word(home,4,"/") where home=:"/u/home/" and missing(word(home,5,"/"))
    select c=user s=omvs                                                                  
      exclude key=#CIA0A subdir=#CIA0A                                                     
      exclude key=#CIA0B subdir=#CIA0B                                                     
      exclude key=#CIA0C subdir=#CIA0C                                                     
      exclude key=#CIA0D subdir=#CIA0D 
    .
    .  many, many 'exclude' statements for all the good values
    .
    sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),        
      key(8,"User",key,pas) key:pgmrname,                              
      uid(10,num,"       Uid") home(20,"HomeDir") subdir(20,"SubDir") 

    The 2nd Pass code 'Run' produced the desired report as:

    zSecure Suite USER OMVS Segment HDir UserID overview - complex TPX      11Dec2024 02:00
    Users HDir=/u/home/ does not match user ID                                             
                                                                                           
    User                 Name                                                  Uid        HomeDir                         SubDir                   
    #TU220X       CICS SCHEDULER ID           1001643        /u/home/#tu200x      #tu200x                  
    AUTO6            NETVIEW INTERNAL           1000123        /u/home/aut06            aut06                    
    CRFCDEV       CLOUD REPORTING FRAM    108341       /u/home/crfcdef          crfcdef                  
    C616947       JOHNSON,CHARMINE            110219       /u/home/d616947      d616947                  

    .

    .

    .

    As we can see the, the discrepancies are revealed very neatly and accurately.  The '0' numeric confused with the 'O' alpha were much of the discrepancies but there were many others due to sloppy administration, definitions on setup for the users once upon a time, long ago.  

    Many, many entries to 'clean-up'.   Thank you Rob for helping with this report.  You and the zSecure team and community are very much appreciated!  

    Very best regards,

    Lynn Gilson



    ------------------------------
    Lynn Gilson
    SysProg
    Ensono Corp.
    Downers Grove, IL,USA
    +001-630-944-1442
    ------------------------------



  • 13.  RE: CARLa for Reporting on OMVS Segments

    Posted Thu December 12, 2024 09:27 AM

    'xxx'  - pretty funny! 

     

    Yes, this code works!  Remind me, what was the 'SubDir' value from?  I do see the 'HomeDir' with the value being the same as the 'SubDir' value, but for example, this one below had a blank and there were others too, see below:

     

    User     Name                        Uid HomeDir              SubDir 

    DB2SDBM1 TELLER,STEVE              22147 /u/bpxm/db2sdbm1            

    DB2SDIST TELLER,STEVE              22128 /u/home/db2sdist     db2sdist

     

    For this user DB2SDBM1 I see the 'HomeDir' value in the 3rd string as 'db2sdbm1' but the 'SubDir' value is blank.  Why would it be blank but the next one is ok?

     

    Mucho Gracias Rob, many thanks for your time. 

     

    Lynn

     

     

     

     

     

     

     






  • 14.  RE: CARLa for Reporting on OMVS Segments

    Posted Thu December 12, 2024 10:12 AM

    Subdir is defined as the 3rd node of the directory:

     define subdir as word(home,4,"/") where home=:"/u/home/" and missing(word(home,5,"/"))

    We use this field in the EXCLUDE command to compare the 3rd node with the user ID.

    Note the WHERE clause in the DEFINE command, this verifies that the home directory is in the prescribed parent directory.  If not, subdir will be empty (missing) and the (improper) value is not excluded.



    ------------------------------
    Rob van Hoboken
    ------------------------------



  • 15.  RE: CARLa for Reporting on OMVS Segments

    Posted Thu December 12, 2024 09:27 AM

    Thank you for testing my coding suggestions, I have to learn to learn count again...  Lets look at the format of the home field:

    /u/home/#cia0a

    and simulate how the word(home,xxx,'/') function assigns words:

    1: 
    2: u
    3: home
    4: #cia0a
    5: 

    This was corroborated by your sample output that showed an empty subdir  column from:

     define subdir as word(home,3,"/") where home=:"/u/home/" and     
            missing(word(home,4,"/"))  
    sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),       

      key(8,"User",key,pas) key:pgmrname,                             
      uid(10,num,"       Uid") home(20,"HomeDir") subdir(20,"SubDir")

    Both index values for subdir should be increased by 1.  Summing up, this is the code that should work for your report:

    n type=racf nopage dd=ckr2pass
    define once(nd) boolean where key=x /* any comparison will do, if TRUE no longer works */
     define each(nd) count
     s c=user s=omvs exists(home)

     summary once,
      'newlist name=OMVSRQ1,',
    / '  tt="zSecure Suite USER OMVS Segment HDir UserID overview",',
    / '  st="Users HDir=/u/home/ does not match user ID"',
    / ' define subdir as word(home,4,"/") where home=:"/u/home/" and
               missing(word(home,5,"/"))',
    / ' select c=user s=omvs'

     summary each,
    '  exclude key=' | key(0) 'subdir=' | key(0)

     summary once,
      ' sortlist " - complex"(tt,page) complex(tt,page) stamp(tt),',
    / '  key(8,"User",key,pas) key:pgmrname,',
    / '  uid(10,num,"       Uid") home(20,"HomeDir") subdir(20,"SubDir")'



    ------------------------------
    Rob van Hoboken
    ------------------------------