I ran into this issue back in the 1990s when I had to work with RACF and never had a real resolution. A RACF access list specifies a userid or a group name. What is not so readily available is a table that can translate a group name to the users that group represents. Another issue in RACF is the concept of a group serves at least two purposes.
- A group of hopefully related users.
- A string that [usually] represents the high level qualifier for a data set name.
For example, you almost certainly have a SYS1 “group” that may not have any users in it, but it has at least one access profile like SYS1.* or SYS1.** to control access to SYS1 data sets..
Just to complicate the issue, even more, data set profiles have the concept of “universal access” or UACC. Your generic SYS1 data set access profile may specify a UACC of READ, which is used when a more specific access profile is not used.
In other words, between UACC and group accesses it can be quite difficult to say who can access what data set in a general case. If you want to know if user JOE can access data set PROD.MAYROLL.MASTER, you first retrieve the RACF access profile for the data set. First check its UACC, then look at the access list for the data set. If the UACC is none, then find out if JOE is in the access list. Then determine which group JOE is in and see if that group is in the access list. If you still have any hair left you'll be lucky!