SIM_VIA_GROUPS is a repeat field, that is, a multi-value field showing one or more groups that allowed access (because you selected only the SIM_VIA=ID_GROUP observations).
SUMMARY SIM_VIA_GROUPS creates a summary level for each unique value found in (any of the values of) SIM_VIA_GROUPS. So, if a user had 3 theoretical access paths to a data set, the user ID pops up in 3 SIM_VIA_GROUPS summary buckets.
Let me see if I understand your requirement. You need a report with all relevant user IDs, and for each user/dsname combination show 1 line with the group(s) that allowed access? This is possible when you change the SIM_VIA_GROUPS field from a normal
data field into one or more
statistics. This is doable, provided you know the universe of applicable group names in advance.
define grp1(8,hdr$blank,'RADMIAM1') boolean where sim_via_groups=RADMIAM1
define grp2(8,hdr$blank,'RADMIAM2') boolean where sim_via_groups=RADMIAM2
define grp3(8,hdr$blank,'RADMINQ ') boolean where sim_via_groups=RADMINQ
select,
sim_via="ID_GROUP",resource=:(prdsa,prdds,syssa),class=dataset,
rectype=(auth,fast,def) req_status_access<>yes,access_result=("00"x)
summary,
userid(nd),
grp1 grp2 grp3,
userid, userid:name class(8), resource(70), access_profile(44), intent(9),
last_tod_sum, tot_count, complex
Obviously, this requires some preparation, but is related the multi-value nature of SIM_VIA_GROUPS and the purpose of SUMMARY processing.
An alternative approach would pivot on having SIM_VIA_GROUPS processed as a
single-value field, which can be done with a two-step process.
Step 1 will use SORTLIST to write out each field combination (without counts, etc) into a flat file.
Step 2 reads the groups names into a single field, same as the user ID, name, etc. using SUBSTR(RECORD,start,length), and
then uses SUMMARY.
You would have to use a DEFINE xx AS CONVERT( ) to change character fields into integers, to do counting, but you might get your results.
------------------------------
Rob van Hoboken
------------------------------