There are some challenges with this request.
1. RACF keeps information in different places: NAME, DFLTGRP, CGGRPNM are in the BASE segment of the profile, TSO and OMVS are different segment types. These are read at arbitrary times by zSecure and that implies the fields are not available in the same (output) line.
But CARLa has an implicit lookup operator : that
could add a
field from the segment into the BASE segment report,
if we had a field name.
2. Unfortunately, there is no
single field to express if the user has a TSO or OMVS segment. We could print the UID number, reasoning that a user without a valid UID could not use z/OS UNIX services, even if the user has an OMVS segment. The same cannot be said for TSO segment fields, but we could print the TSO
maximum logon size. A missing logon size could be construed as
no TSO access.
newlist type=racf
select class=user segment=base
sortlist profile(8,"Userid") name dfltgrp cggrpnm :uid(9) :tmsize(8,"TSO size")
3. Adding the "General resource access" in this single line would not be practical.
We can also generate a single line for each of the components, and bundle them together per
userid value. This is done with the MERGELIST block. It creates sorting
across newlist boundaries using the field values from the individual sortlist lines.
mergelist
newlist type=racf
s c=user s=base mask=*
sortlist profile(8,"Userid",page),
:supgroup(nd),
segment(nd),
Name,
dfltgrp,
congrpnm(hor)
newlist type=racf
s c=user s=tso mask=*
sortlist profile(8,"Userid"),
:supgroup(nd),
segment
newlist type=racf
s c=user s=omvs mask=*
sortlist profile(8,"Userid"),
:supgroup(nd),
segment
newlist type=racf_access
s c<>(user,group,dataset) id:id.id.class=USER id=*
sortlist id,
class profile
endmerge
This uses :supgroup to create an empty field (superior groups only have value for group profiles), so any of the output lines for the USER profile sort before output lines from racf_access (CLASS is a non-blank value, so it sorts after the empty fields).
You could adjust the filter (mask=* and id=*) to limit this report to specific user ids.