Hi Tom,
I would like to generate a report with all permits (including groups or "*"). However, for better readability, the "Direct" column should be filled in for lines where a user has direct authorization. The same problem occurs with Exists and without Explode: The user IDs with direct authorization are bundled at the beginning of a new profile where they exist and displayed in the "Direct" column, rather than in the row/height of the profile where the authorization exists. I hope I have been able to express myself clearly.
Code Now:
n retain
select class=*
define defacl("ID Access Via When",explode,sort),
subselect acl(user=* or group=* or id("*"))
define dir("Direkt",8) subselect acl(exists(user))
sortlist class(nd) key("Profile",60),
class(10) defacl dir defacl:name(20) uacc
Best regards
Stephan
------------------------------
Stephan Reichelt
------------------------------
Original Message:
Sent: Wed November 19, 2025 05:30 AM
From: Tom Zeehandelaar
Subject: Assigning a specific value to a variable when querying an ACL
Hi Stephan,
if I understand you correct, you want to report the user IDs with a direct permission to the ACL only.
In that case, you do not want to explode the ACL in your "define dir" command, as that would include also all user IDs that are permitted through a group connection. You can try something along the lines of: define dir("Direkt",8) subselect acl(exists(user))
That subselection only reports the IDs from the ACL that are user IDs and not group or ID(*).
Hope this helps.
------------------------------
Tom Zeehandelaar
z/OS Security Enablement Specialist - zSecure developer
IBM
------------------------------
Original Message:
Sent: Wed November 19, 2025 05:11 AM
From: Stephan Reichelt
Subject: Assigning a specific value to a variable when querying an ACL
Hello Jeroen,
Thank you for your prompt reply.
However, I now have a situation where the results are displayed in the wrong row (always at the beginning of a new profile).
I would like them to be displayed in the row where the ID and user are the same.
Result:
Profile Class ID Access Via When Direkt
B48.*.** $BETA ZZZUSER ALTER SYSP M500012
B48.*.** $BETA IBMUSER ALTER SYSP
B48.*.** $BETA XXYTUSE ALTER SYSP
B48.*.** $BETA YYYMEGA ALTER SYSP
B48.*.** $BETA M500012 NONE M500012
Code:
n retain
select class=*
define defacl("ID Access Via When",explode,sort),
subselect acl(user=* or group=* or id="*")
define dir("Direkt",explode,sort,8) subselect acl(id==user)
sortlist class(nd) key("Profile",60),
class(10) defacl dir defacl:name(20) uacc
Regards
Stephan
------------------------------
Stephan Reichelt
Original Message:
Sent: Wed November 19, 2025 04:17 AM
From: Jeroen Tiggelman
Subject: Assigning a specific value to a variable when querying an ACL
Hi Stephan
The clause "ID=user" looks for the value "USER".
For a field-field compare you must use "==" instead of "=": "ID==USER".
Regards,
Jeroen
------------------------------
Jeroen Tiggelman
IBM - Software Development Manager IBM zSecure
Delft